mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
WebContent: Allow creating a WebDriverConnection with an existing socket
The socket used by WebDriverConnection will be created separately for Ladybird.
This commit is contained in:
parent
b00d77eac8
commit
d2b2d3ad80
2 changed files with 2 additions and 2 deletions
|
@ -209,7 +209,7 @@ ErrorOr<NonnullRefPtr<WebDriverConnection>> WebDriverConnection::connect(Connect
|
||||||
auto socket = TRY(Core::Stream::LocalSocket::connect(webdriver_ipc_path));
|
auto socket = TRY(Core::Stream::LocalSocket::connect(webdriver_ipc_path));
|
||||||
|
|
||||||
dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver");
|
dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver");
|
||||||
return adopt_nonnull_ref_or_enomem(new (nothrow) WebDriverConnection(move(socket), web_content_client, page_host));
|
return try_create(move(socket), web_content_client, page_host);
|
||||||
}
|
}
|
||||||
|
|
||||||
WebDriverConnection::WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, ConnectionFromClient& web_content_client, PageHost& page_host)
|
WebDriverConnection::WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, ConnectionFromClient& web_content_client, PageHost& page_host)
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace WebContent {
|
||||||
|
|
||||||
class WebDriverConnection final
|
class WebDriverConnection final
|
||||||
: public IPC::ConnectionToServer<WebDriverClientEndpoint, WebDriverServerEndpoint> {
|
: public IPC::ConnectionToServer<WebDriverClientEndpoint, WebDriverServerEndpoint> {
|
||||||
C_OBJECT_ABSTRACT(WebDriverConnection)
|
C_OBJECT(WebDriverConnection)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ErrorOr<NonnullRefPtr<WebDriverConnection>> connect(ConnectionFromClient& web_content_client, PageHost& page_host, String const& webdriver_ipc_path);
|
static ErrorOr<NonnullRefPtr<WebDriverConnection>> connect(ConnectionFromClient& web_content_client, PageHost& page_host, String const& webdriver_ipc_path);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue