2023-11-08 11:47:41 -07:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibIPC/ConnectionToServer.h>
|
|
|
|
#include <LibWeb/Worker/WebWorkerClientEndpoint.h>
|
|
|
|
#include <LibWeb/Worker/WebWorkerServerEndpoint.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
class WebWorkerClient final
|
|
|
|
: public IPC::ConnectionToServer<WebWorkerClientEndpoint, WebWorkerServerEndpoint>
|
|
|
|
, public WebWorkerClientEndpoint {
|
2024-11-21 12:46:45 -07:00
|
|
|
C_OBJECT_ABSTRACT(WebWorkerClient);
|
2023-11-08 11:47:41 -07:00
|
|
|
|
|
|
|
public:
|
2024-10-22 15:47:33 -06:00
|
|
|
explicit WebWorkerClient(IPC::Transport);
|
2023-11-08 11:47:41 -07:00
|
|
|
|
2024-07-09 03:00:06 -06:00
|
|
|
virtual void did_close_worker() override;
|
|
|
|
|
|
|
|
Function<void()> on_worker_close;
|
|
|
|
|
2024-10-22 15:47:33 -06:00
|
|
|
IPC::File clone_transport();
|
2024-01-06 13:13:59 -07:00
|
|
|
|
2023-11-08 11:47:41 -07:00
|
|
|
private:
|
|
|
|
virtual void die() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|