WebContent+LibWebView: Consolidate the way browsers connect to WebDriver

Currently, on Serenity, we connect to WebDriver from the browser-side of
the WebContent connection for both Browser and headless-browser.

On Lagom, we connect from within the WebContent process itself, signaled
by a command line flag.

This patch changes Lagom browsers to connect to WebDriver the same way
that Serenity browsers do. This will ensure we can do other initializers
in the same order across all platforms and browsers.
This commit is contained in:
Timothy Flynn 2023-03-16 08:50:22 -04:00 committed by Linus Groh
parent 3a7257c9fe
commit 700ad6bf35
Notes: sideshowbarker 2024-07-17 16:23:55 +09:00
7 changed files with 19 additions and 20 deletions

View file

@ -603,7 +603,7 @@ void WebContentView::create_client()
m_client_state = {};
auto candidate_web_content_paths = get_paths_for_helper_process("WebContent"sv).release_value_but_fixme_should_propagate_errors();
auto new_client = launch_web_content_process(candidate_web_content_paths, m_webdriver_content_ipc_path).release_value_but_fixme_should_propagate_errors();
auto new_client = launch_web_content_process(candidate_web_content_paths).release_value_but_fixme_should_propagate_errors();
m_web_content_notifier.setSocket(new_client->socket().fd().value());
m_web_content_notifier.setEnabled(true);
@ -636,6 +636,9 @@ void WebContentView::create_client()
// FIXME: Get the screen rect.
// client().async_update_screen_rects(GUI::Desktop::the().rects(), GUI::Desktop::the().main_screen_index());
if (!m_webdriver_content_ipc_path.is_empty())
client().async_connect_to_webdriver(m_webdriver_content_ipc_path);
}
void WebContentView::handle_web_content_process_crash()