2022-11-08 12:18:11 -03:00
|
|
|
/*
|
2024-09-29 10:40:17 -03:00
|
|
|
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@ladybird.org>
|
2022-11-08 12:18:11 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2022-11-14 13:00:31 -03:00
|
|
|
#include <WebDriver/Client.h>
|
|
|
|
|
#include <WebDriver/WebContentConnection.h>
|
2022-11-08 12:18:11 -03:00
|
|
|
|
|
|
|
|
namespace WebDriver {
|
|
|
|
|
|
2024-10-22 18:47:33 -03:00
|
|
|
WebContentConnection::WebContentConnection(IPC::Transport transport)
|
|
|
|
|
: IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint>(*this, move(transport), 1)
|
2022-11-08 12:18:11 -03:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WebContentConnection::die()
|
|
|
|
|
{
|
2023-03-19 08:08:52 -03:00
|
|
|
if (on_close)
|
|
|
|
|
on_close();
|
2022-11-08 12:18:11 -03:00
|
|
|
}
|
|
|
|
|
|
2024-11-01 08:42:21 -03:00
|
|
|
void WebContentConnection::driver_execution_complete(Web::WebDriver::Response const& response)
|
2024-10-25 11:28:29 -03:00
|
|
|
{
|
2024-11-01 08:42:21 -03:00
|
|
|
if (on_driver_execution_complete)
|
|
|
|
|
on_driver_execution_complete(response);
|
2024-10-30 21:29:26 -03:00
|
|
|
}
|
|
|
|
|
|
2022-11-08 12:18:11 -03:00
|
|
|
}
|