mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWebView+UI: Move ownership of application services to LibWebView
LibWebView now knows how to launch RequestServer and ImageDecoderServer without help from the UI, so let's move ownership of these services over to LibWebView for de-duplication.
This commit is contained in:
parent
1b38ebcc7f
commit
bb7dff7dfe
Notes:
github-actions[bot]
2024-11-14 10:48:40 +00:00
Author: https://github.com/trflynn89
Commit: bb7dff7dfe
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2327
17 changed files with 99 additions and 188 deletions
|
@ -33,7 +33,7 @@ HeadlessWebView::HeadlessWebView(Core::AnonymousBuffer theme, Web::DevicePixelSi
|
|||
|
||||
on_request_worker_agent = []() {
|
||||
auto web_worker_paths = MUST(WebView::get_paths_for_helper_process("WebWorker"sv));
|
||||
auto worker_client = MUST(WebView::launch_web_worker_process(web_worker_paths, Application::request_client()));
|
||||
auto worker_client = MUST(WebView::launch_web_worker_process(web_worker_paths));
|
||||
|
||||
return worker_client->clone_transport();
|
||||
};
|
||||
|
@ -162,8 +162,8 @@ NonnullOwnPtr<HeadlessWebView> HeadlessWebView::create_child(HeadlessWebView con
|
|||
void HeadlessWebView::initialize_client(CreateNewClient create_new_client)
|
||||
{
|
||||
if (create_new_client == CreateNewClient::Yes) {
|
||||
auto request_server_socket = WebView::connect_new_request_server_client(Application::request_client()).release_value_but_fixme_should_propagate_errors();
|
||||
auto image_decoder_socket = WebView::connect_new_image_decoder_client(Application::image_decoder_client()).release_value_but_fixme_should_propagate_errors();
|
||||
auto request_server_socket = WebView::connect_new_request_server_client().release_value_but_fixme_should_propagate_errors();
|
||||
auto image_decoder_socket = WebView::connect_new_image_decoder_client().release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
auto web_content_paths = WebView::get_paths_for_helper_process("WebContent"sv).release_value_but_fixme_should_propagate_errors();
|
||||
m_client_state.client = WebView::launch_web_content_process(*this, web_content_paths, move(image_decoder_socket), move(request_server_socket)).release_value_but_fixme_should_propagate_errors();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue