diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index 315b1084fe7..9adfae7cadd 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include namespace WebContent { @@ -252,18 +251,17 @@ static ErrorOr get_property(JsonValue const } } -ErrorOr> WebDriverConnection::connect(ConnectionFromClient& web_content_client, Web::PageClient& page_client, String const& webdriver_ipc_path) +ErrorOr> WebDriverConnection::connect(Web::PageClient& page_client, String const& webdriver_ipc_path) { dbgln_if(WEBDRIVER_DEBUG, "Trying to connect to {}", webdriver_ipc_path); auto socket = TRY(Core::Stream::LocalSocket::connect(webdriver_ipc_path)); dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver"); - return try_create(move(socket), web_content_client, page_client); + return try_create(move(socket), page_client); } -WebDriverConnection::WebDriverConnection(NonnullOwnPtr socket, ConnectionFromClient& web_content_client, Web::PageClient& page_client) +WebDriverConnection::WebDriverConnection(NonnullOwnPtr socket, Web::PageClient& page_client) : IPC::ConnectionToServer(*this, move(socket)) - , m_web_content_client(web_content_client) , m_page_client(page_client) , m_current_window_handle("main"sv) { diff --git a/Userland/Services/WebContent/WebDriverConnection.h b/Userland/Services/WebContent/WebDriverConnection.h index bb2c696413a..a09a8b51ed7 100644 --- a/Userland/Services/WebContent/WebDriverConnection.h +++ b/Userland/Services/WebContent/WebDriverConnection.h @@ -29,11 +29,11 @@ class WebDriverConnection final C_OBJECT(WebDriverConnection) public: - static ErrorOr> connect(ConnectionFromClient& web_content_client, Web::PageClient& page_client, String const& webdriver_ipc_path); + static ErrorOr> connect(Web::PageClient& page_client, String const& webdriver_ipc_path); virtual ~WebDriverConnection() = default; private: - WebDriverConnection(NonnullOwnPtr socket, ConnectionFromClient& web_content_client, Web::PageClient& page_client); + WebDriverConnection(NonnullOwnPtr socket, Web::PageClient& page_client); virtual void die() override { } @@ -105,7 +105,6 @@ private: ErrorOr extract_the_script_arguments_from_a_request(JsonValue const& payload); void delete_cookies(Optional const& name = {}); - ConnectionFromClient& m_web_content_client; Web::PageClient& m_page_client; // https://w3c.github.io/webdriver/#dfn-page-load-strategy