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
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibIPC/ConnectionFromClient.h>
|
2024-10-22 15:47:33 -06:00
|
|
|
#include <LibIPC/Transport.h>
|
2022-11-14 11:00:31 -05:00
|
|
|
#include <WebContent/WebDriverClientEndpoint.h>
|
|
|
|
#include <WebContent/WebDriverServerEndpoint.h>
|
2022-11-08 10:18:11 -05:00
|
|
|
|
|
|
|
namespace WebDriver {
|
|
|
|
|
|
|
|
class Client;
|
|
|
|
|
|
|
|
class WebContentConnection
|
|
|
|
: public IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint> {
|
|
|
|
C_OBJECT_ABSTRACT(WebContentConnection)
|
|
|
|
public:
|
2024-10-22 15:47:33 -06:00
|
|
|
explicit WebContentConnection(IPC::Transport transport);
|
2022-11-08 10:18:11 -05:00
|
|
|
|
2023-03-19 14:08:52 +03:00
|
|
|
Function<void()> on_close;
|
2024-11-01 07:42:21 -04:00
|
|
|
Function<void(Web::WebDriver::Response)> on_driver_execution_complete;
|
2022-11-08 10:18:11 -05:00
|
|
|
|
2024-09-13 07:42:24 -04:00
|
|
|
private:
|
2023-03-19 14:08:52 +03:00
|
|
|
virtual void die() override;
|
2024-09-13 07:42:24 -04:00
|
|
|
|
2024-11-01 07:42:21 -04:00
|
|
|
virtual void driver_execution_complete(Web::WebDriver::Response const&) override;
|
2022-11-08 10:18:11 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|