mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
WebContent: Remove WebContent::ConnectionFromClient from WebDriver
This commit is contained in:
parent
46b2cb308d
commit
0135a2ab5b
Notes:
sideshowbarker
2024-07-17 11:34:34 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0135a2ab5b Pull-request: https://github.com/SerenityOS/serenity/pull/16145 Reviewed-by: https://github.com/linusg
2 changed files with 5 additions and 8 deletions
|
@ -32,7 +32,6 @@
|
|||
#include <LibWeb/Platform/Timer.h>
|
||||
#include <LibWeb/WebDriver/ExecuteScript.h>
|
||||
#include <LibWeb/WebDriver/Screenshot.h>
|
||||
#include <WebContent/ConnectionFromClient.h>
|
||||
#include <WebContent/WebDriverConnection.h>
|
||||
|
||||
namespace WebContent {
|
||||
|
@ -252,18 +251,17 @@ static ErrorOr<PropertyType, Web::WebDriver::Error> get_property(JsonValue const
|
|||
}
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<WebDriverConnection>> WebDriverConnection::connect(ConnectionFromClient& web_content_client, Web::PageClient& page_client, String const& webdriver_ipc_path)
|
||||
ErrorOr<NonnullRefPtr<WebDriverConnection>> 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<Core::Stream::LocalSocket> socket, ConnectionFromClient& web_content_client, Web::PageClient& page_client)
|
||||
WebDriverConnection::WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, Web::PageClient& page_client)
|
||||
: IPC::ConnectionToServer<WebDriverClientEndpoint, WebDriverServerEndpoint>(*this, move(socket))
|
||||
, m_web_content_client(web_content_client)
|
||||
, m_page_client(page_client)
|
||||
, m_current_window_handle("main"sv)
|
||||
{
|
||||
|
|
|
@ -29,11 +29,11 @@ class WebDriverConnection final
|
|||
C_OBJECT(WebDriverConnection)
|
||||
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<WebDriverConnection>> connect(ConnectionFromClient& web_content_client, Web::PageClient& page_client, String const& webdriver_ipc_path);
|
||||
static ErrorOr<NonnullRefPtr<WebDriverConnection>> connect(Web::PageClient& page_client, String const& webdriver_ipc_path);
|
||||
virtual ~WebDriverConnection() = default;
|
||||
|
||||
private:
|
||||
WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, ConnectionFromClient& web_content_client, Web::PageClient& page_client);
|
||||
WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, Web::PageClient& page_client);
|
||||
|
||||
virtual void die() override { }
|
||||
|
||||
|
@ -105,7 +105,6 @@ private:
|
|||
ErrorOr<ScriptArguments, Web::WebDriver::Error> extract_the_script_arguments_from_a_request(JsonValue const& payload);
|
||||
void delete_cookies(Optional<StringView> const& name = {});
|
||||
|
||||
ConnectionFromClient& m_web_content_client;
|
||||
Web::PageClient& m_page_client;
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-page-load-strategy
|
||||
|
|
Loading…
Reference in a new issue