mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
33
Libraries/LibWeb/Worker/WebWorkerClient.cpp
Normal file
33
Libraries/LibWeb/Worker/WebWorkerClient.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibCore/System.h>
|
||||
#include <LibWeb/Worker/WebWorkerClient.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
void WebWorkerClient::die()
|
||||
{
|
||||
// FIXME: Notify WorkerAgent that the worker is ded
|
||||
}
|
||||
|
||||
void WebWorkerClient::did_close_worker()
|
||||
{
|
||||
if (on_worker_close)
|
||||
on_worker_close();
|
||||
}
|
||||
|
||||
WebWorkerClient::WebWorkerClient(IPC::Transport transport)
|
||||
: IPC::ConnectionToServer<WebWorkerClientEndpoint, WebWorkerServerEndpoint>(*this, move(transport))
|
||||
{
|
||||
}
|
||||
|
||||
IPC::File WebWorkerClient::clone_transport()
|
||||
{
|
||||
return MUST(m_transport.clone_for_transfer());
|
||||
}
|
||||
|
||||
}
|
34
Libraries/LibWeb/Worker/WebWorkerClient.h
Normal file
34
Libraries/LibWeb/Worker/WebWorkerClient.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/HashMap.h>
|
||||
#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 {
|
||||
IPC_CLIENT_CONNECTION(WebWorkerClient, "/tmp/session/%sid/portal/webworker"sv);
|
||||
|
||||
public:
|
||||
explicit WebWorkerClient(IPC::Transport);
|
||||
|
||||
virtual void did_close_worker() override;
|
||||
|
||||
Function<void()> on_worker_close;
|
||||
|
||||
IPC::File clone_transport();
|
||||
|
||||
private:
|
||||
virtual void die() override;
|
||||
};
|
||||
|
||||
}
|
3
Libraries/LibWeb/Worker/WebWorkerClient.ipc
Normal file
3
Libraries/LibWeb/Worker/WebWorkerClient.ipc
Normal file
|
@ -0,0 +1,3 @@
|
|||
endpoint WebWorkerClient {
|
||||
did_close_worker() =|
|
||||
}
|
14
Libraries/LibWeb/Worker/WebWorkerServer.ipc
Normal file
14
Libraries/LibWeb/Worker/WebWorkerServer.ipc
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <LibURL/URL.h>
|
||||
#include <LibIPC/File.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
#include <LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h>
|
||||
#include <LibWeb/Bindings/WorkerPrototype.h>
|
||||
|
||||
endpoint WebWorkerServer {
|
||||
|
||||
start_dedicated_worker(URL::URL url, Web::Bindings::WorkerType type, Web::Bindings::RequestCredentials credentials, String name, Web::HTML::TransferDataHolder message_port, Web::HTML::SerializedEnvironmentSettingsObject outside_settings) =|
|
||||
|
||||
close_worker() =|
|
||||
|
||||
handle_file_return(i32 error, Optional<IPC::File> file, i32 request_id) =|
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue