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