1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:27:35 +00:00

WebContent: Add a very-empty WebDriver IPC class to WebContent

This just sets up the infrastructure for the WebContent process to house
WebDriver IPCs, and adds an IPC for WebContent to create the WebDriver
connection. The WebDriverConnection class inside WebContent ultimately
will contain most of what is currently in WebDriver::Session (so the
copyright attributions are copied here as well).

The socket created by WebDriver is currently /tmp/browser_webdriver
(formatted with some IDs). This will be moved to the /tmp/webdriver
folder, as WebDriver will create multiple sockets to communicate with
both Browser and WebContent as the IPCs are iteratively moved to
WebContent. That path is unveiled here, though it is unused as of this
commit.
This commit is contained in:
Timothy Flynn 2022-11-08 10:03:07 -05:00 committed by Tim Flynn
parent 8ae10ba0fd
commit 6b014489d4
12 changed files with 117 additions and 1 deletions

View file

@ -69,6 +69,15 @@ Web::Page const& ConnectionFromClient::page() const
return m_page_host->page();
}
void ConnectionFromClient::connect_to_webdriver(String const& webdriver_ipc_path)
{
// FIXME: Propogate this error back to the browser.
if (auto result = m_page_host->connect_to_webdriver(webdriver_ipc_path); result.is_error())
dbgln("Unable to connect to the WebDriver process: {}", result.error());
else
set_is_webdriver_active(true);
}
void ConnectionFromClient::update_system_theme(Core::AnonymousBuffer const& theme_buffer)
{
Gfx::set_system_theme(theme_buffer);