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:
Timothy Flynn 2024-11-13 16:08:08 -05:00 committed by Andreas Kling
parent 652dde5022
commit 44d6601dc5
Notes: github-actions[bot] 2024-11-14 10:48:29 +00:00
5 changed files with 3 additions and 19 deletions

View file

@ -12,7 +12,6 @@
#include <LibURL/URL.h>
#include <LibWeb/HTML/SelectedFile.h>
#include <LibWebView/Application.h>
#include <LibWebView/HelperProcess.h>
#include <LibWebView/SearchEngine.h>
#include <LibWebView/SourceHighlighter.h>
#include <LibWebView/URL.h>
@ -345,11 +344,6 @@ static void copy_data_to_clipboard(StringView data, NSPasteboardType pasteboard_
return [self.observer onCreateNewTab:{} activateTab:activate_tab];
};
m_web_view_bridge->on_request_worker_agent = []() {
auto worker_client = MUST(WebView::launch_web_worker_process());
return worker_client->clone_transport();
};
m_web_view_bridge->on_activate_tab = [weak_self]() {
LadybirdWebView* self = weak_self;
if (self == nil) {

View file

@ -30,11 +30,6 @@ HeadlessWebView::HeadlessWebView(Core::AnonymousBuffer theme, Web::DevicePixelSi
return web_view.handle();
};
on_request_worker_agent = []() {
auto worker_client = MUST(WebView::launch_web_worker_process());
return worker_client->clone_transport();
};
on_reposition_window = [this](auto position) {
client().async_set_window_position(m_client_state.page_index, position.template to_type<Web::DevicePixels>());

View file

@ -126,11 +126,6 @@ WebContentView::WebContentView(QWidget* window, RefPtr<WebView::WebContentClient
finish_handling_drag_event(event);
};
on_request_worker_agent = [&]() {
auto worker_client = MUST(WebView::launch_web_worker_process());
return worker_client->clone_transport();
};
m_select_dropdown = new QMenu("Select Dropdown", this);
QObject::connect(m_select_dropdown, &QMenu::aboutToHide, this, [this]() {
if (!m_select_dropdown->activeAction())