LibWeb+LibWebView+Services: Add IPC for starting WebWorker of a type

The provides some of the plumbing for a WebContent process to spin
up a WebWorker that is not just a dedicated worker.
This commit is contained in:
Shannon Booth 2025-04-24 17:07:09 +12:00 committed by Andreas Kling
parent 041ff0c7ff
commit a2cca59516
Notes: github-actions[bot] 2025-04-25 14:45:22 +00:00
10 changed files with 49 additions and 13 deletions

View file

@ -659,10 +659,10 @@ void WebContentClient::did_allocate_backing_stores(u64 page_id, i32 front_bitmap
view->did_allocate_backing_stores({}, front_bitmap_id, front_bitmap, back_bitmap_id, back_bitmap);
}
Messages::WebContentClient::RequestWorkerAgentResponse WebContentClient::request_worker_agent(u64 page_id)
Messages::WebContentClient::RequestWorkerAgentResponse WebContentClient::request_worker_agent(u64 page_id, Web::Bindings::AgentType worker_type)
{
if (auto view = view_for_page_id(page_id); view.has_value()) {
auto worker_client = MUST(WebView::launch_web_worker_process());
auto worker_client = MUST(WebView::launch_web_worker_process(worker_type));
return worker_client->clone_transport();
}