summaryrefslogtreecommitdiff
path: root/Ladybird/WebContentView.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-11-14 11:08:44 -0500
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-25 07:58:58 -0700
commit4031630b49553c3e847d20f587c7445687586ec1 (patch)
tree65e457dc0208bcda064ef446fa6845ef7205efb0 /Ladybird/WebContentView.cpp
parent7021d30288f66339b3cdca986333c058b0193e6b (diff)
downloadserenity-4031630b49553c3e847d20f587c7445687586ec1.zip
Ladybird: Construct a WebDriverConnection when instructed to do so
The WebDriver will pass the --webdriver-fd-passing-socket command line option when it launches Ladybird. Forward this flag onto the WebContent process, where it will create the WebDriverConnection for IPC.
Diffstat (limited to 'Ladybird/WebContentView.cpp')
-rw-r--r--Ladybird/WebContentView.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Ladybird/WebContentView.cpp b/Ladybird/WebContentView.cpp
index 2c2dfca039..15a41350e0 100644
--- a/Ladybird/WebContentView.cpp
+++ b/Ladybird/WebContentView.cpp
@@ -54,7 +54,8 @@
#include <QTreeView>
#include <QVBoxLayout>
-WebContentView::WebContentView()
+WebContentView::WebContentView(int webdriver_fd_passing_socket)
+ : m_webdriver_fd_passing_socket(webdriver_fd_passing_socket)
{
setMouseTracking(true);
@@ -589,12 +590,15 @@ void WebContentView::create_client()
auto takeover_string = String::formatted("WebContent:{}", wc_fd);
MUST(Core::System::setenv("SOCKET_TAKEOVER"sv, takeover_string, true));
- auto fd_passing_socket_string = String::number(wc_fd_passing_fd);
+ auto webcontent_fd_passing_socket_string = String::number(wc_fd_passing_fd);
+ auto webdriver_fd_passing_socket_string = String::number(m_webdriver_fd_passing_socket);
char const* argv[] = {
"WebContent",
"--webcontent-fd-passing-socket",
- fd_passing_socket_string.characters(),
+ webcontent_fd_passing_socket_string.characters(),
+ "--webdriver-fd-passing-socket",
+ webdriver_fd_passing_socket_string.characters(),
nullptr,
};