1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +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:
Timothy Flynn 2022-11-14 11:08:44 -05:00 committed by Andrew Kaster
parent 7021d30288
commit 4031630b49
8 changed files with 38 additions and 13 deletions

View file

@ -21,7 +21,8 @@
extern String s_serenity_resource_root;
extern Browser::Settings* s_settings;
BrowserWindow::BrowserWindow()
BrowserWindow::BrowserWindow(int webdriver_fd_passing_socket)
: m_webdriver_fd_passing_socket(webdriver_fd_passing_socket)
{
m_tabs_container = new QTabWidget(this);
m_tabs_container->setElideMode(Qt::TextElideMode::ElideRight);
@ -282,7 +283,7 @@ void BrowserWindow::debug_request(String const& request, String const& argument)
void BrowserWindow::new_tab()
{
auto tab = make<Tab>(this);
auto tab = make<Tab>(this, m_webdriver_fd_passing_socket);
auto tab_ptr = tab.ptr();
m_tabs.append(std::move(tab));