mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:15:07 +00:00
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.
This commit is contained in:
parent
7021d30288
commit
4031630b49
8 changed files with 38 additions and 13 deletions
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue