mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Route BroadcastChannel messages over IPC so matching channels can receive them across WebContent and WebWorker processes, rather than only within a single process. Each channel now serializes its payload, sends it upward over IPC, and receiving processes deliver it locally after matching by storage key and channel name.
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
#include <LibURL/URL.h>
|
|
#include <LibIPC/File.h>
|
|
#include <LibIPC/TransportHandle.h>
|
|
#include <LibWeb/Bindings/AgentType.h>
|
|
#include <LibWeb/HTML/BroadcastChannelMessage.h>
|
|
#include <LibWeb/Bindings/WorkerPrototype.h>
|
|
#include <LibWeb/HTML/StructuredSerialize.h>
|
|
#include <LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h>
|
|
|
|
endpoint WebWorkerServer {
|
|
|
|
connect_to_request_server(IPC::TransportHandle handle) =|
|
|
connect_to_image_decoder(IPC::TransportHandle handle) =|
|
|
|
|
start_worker(URL::URL url,
|
|
Web::Bindings::WorkerType type,
|
|
Web::Bindings::RequestCredentials credentials,
|
|
String name,
|
|
Web::HTML::TransferDataEncoder message_port,
|
|
Web::HTML::SerializedEnvironmentSettingsObject outside_settings,
|
|
Web::Bindings::AgentType agent_type) =|
|
|
|
|
close_worker() =|
|
|
|
|
broadcast_channel_message(Web::HTML::BroadcastChannelMessage message) =|
|
|
|
|
handle_file_return(i32 error, Optional<IPC::File> file, i32 request_id) =|
|
|
}
|