mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibWebView+UI: Handle worker agent requests from within LibWebView
There is no longer any UI-specific facilities needed to launch a worker agent.
This commit is contained in:
committed by
Andreas Kling
parent
652dde5022
commit
44d6601dc5
@@ -9,6 +9,7 @@
|
||||
#include "ViewImplementation.h"
|
||||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
#include <LibWebView/CookieJar.h>
|
||||
#include <LibWebView/HelperProcess.h>
|
||||
|
||||
namespace WebView {
|
||||
|
||||
@@ -667,8 +668,8 @@ void WebContentClient::inspector_did_export_inspector_html(u64 page_id, String c
|
||||
Messages::WebContentClient::RequestWorkerAgentResponse WebContentClient::request_worker_agent(u64 page_id)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_request_worker_agent)
|
||||
return view->on_request_worker_agent();
|
||||
auto worker_client = MUST(WebView::launch_web_worker_process());
|
||||
return worker_client->clone_transport();
|
||||
}
|
||||
|
||||
return IPC::File {};
|
||||
|
||||
Reference in New Issue
Block a user