summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWebView
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-11-08 10:18:11 -0500
committerTim Flynn <trflynn89@pm.me>2022-11-08 19:58:34 -0500
commit50ae1ad18a0fa0efa6fed6f10ab6c78e852c9b0a (patch)
treeb1fb850f34b20ba163737901d5aa586dc535dbd0 /Userland/Libraries/LibWebView
parent6b014489d406c31a727e88ca304e60513f832021 (diff)
downloadserenity-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/Libraries/LibWebView')
-rw-r--r--Userland/Libraries/LibWebView/OutOfProcessWebView.cpp4
-rw-r--r--Userland/Libraries/LibWebView/OutOfProcessWebView.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
index d04df78f99..a354601df4 100644
--- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
@@ -595,9 +595,9 @@ void OutOfProcessWebView::set_preferred_color_scheme(Web::CSS::PreferredColorSch
client().async_set_preferred_color_scheme(color_scheme);
}
-void OutOfProcessWebView::set_is_webdriver_active(bool is_webdriver_enabled)
+void OutOfProcessWebView::connect_to_webdriver(String const& webdriver_ipc_path)
{
- client().async_set_is_webdriver_active(is_webdriver_enabled);
+ client().async_connect_to_webdriver(webdriver_ipc_path);
}
void OutOfProcessWebView::set_window_position(Gfx::IntPoint const& position)
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.h b/Userland/Libraries/LibWebView/OutOfProcessWebView.h
index abf43cc71e..a2d24d455b 100644
--- a/Userland/Libraries/LibWebView/OutOfProcessWebView.h
+++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.h
@@ -79,7 +79,7 @@ public:
void set_content_filters(Vector<String>);
void set_proxy_mappings(Vector<String> proxies, HashMap<String, size_t> mappings);
void set_preferred_color_scheme(Web::CSS::PreferredColorScheme);
- void set_is_webdriver_active(bool);
+ void connect_to_webdriver(String const& webdriver_ipc_path);
void set_window_position(Gfx::IntPoint const&);
void set_window_size(Gfx::IntSize const&);