From 0135a2ab5b8e0effdb6a13b11427668c3e379972 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 21 Nov 2022 16:13:37 -0500 Subject: [PATCH] WebContent: Remove WebContent::ConnectionFromClient from WebDriver --- Userland/Services/WebContent/WebDriverConnection.cpp | 8 +++----- Userland/Services/WebContent/WebDriverConnection.h | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index 315b1084fe..9adfae7cad 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 bb2c696413..a09a8b51ed 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