diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-11-08 10:18:11 -0500 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-11-08 19:58:34 -0500 |
commit | 50ae1ad18a0fa0efa6fed6f10ab6c78e852c9b0a (patch) | |
tree | b1fb850f34b20ba163737901d5aa586dc535dbd0 /Userland/Applications/Browser/Tab.cpp | |
parent | 6b014489d406c31a727e88ca304e60513f832021 (diff) | |
download | serenity-50ae1ad18a0fa0efa6fed6f10ab6c78e852c9b0a.zip |
Browser+LibWebView+WebDriver: Connect WebDriver to WebContent
First, this moves the WebDriver socket to the /tmp/websocket/ directory,
as WebDriver now creates multiple sockets per session. Those sockets are
now created with Core::LocalServer rather than manually setting up the
listening sockets (this was an existing FIXME which resolved some issues
I was hitting with creating a second listening socket).
WebDriver passes both socket paths to Browser via command line. Browser
continues to connect itself via one socket path, then forwards the other
socket path to the WebContent process created by the OOPWV. WebContent
then connects to WebDriver over this path.
WebContent will temporarily set the navigator.webdriver flag to true
after connecting to WebDriver. This will soon be moved to its own IPC to
be sent by WebDriver.
Diffstat (limited to 'Userland/Applications/Browser/Tab.cpp')
-rw-r--r-- | Userland/Applications/Browser/Tab.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 8141f1c0d8..4559f7a3ad 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -126,8 +126,7 @@ Tab::Tab(BrowserWindow& window) m_web_content_view->set_content_filters({}); m_web_content_view->set_proxy_mappings(g_proxies, g_proxy_mappings); - - if (!g_web_driver_connection.is_null()) + if (!g_webdriver_content_ipc_path.is_empty()) enable_webdriver_mode(); auto& go_back_button = toolbar.add_action(window.go_back_action()); @@ -668,7 +667,7 @@ void Tab::hide_event(GUI::HideEvent&) void Tab::enable_webdriver_mode() { - m_web_content_view->set_is_webdriver_active(true); + m_web_content_view->connect_to_webdriver(Browser::g_webdriver_content_ipc_path); auto& webdriver_banner = *find_descendant_of_type_named<GUI::Widget>("webdriver_banner"); webdriver_banner.set_visible(true); } |