ladybird/Userland/Services/WebDriver/BrowserConnection.h
Sam Atkins 80603f141a WebDriver: Add new WebDriver service
WebDriver aims to implement the WebDriver specification found at
https://w3c.github.io/webdriver/webdriver-spec.html . It's an HTTP
server that can create Browser sessions and control them.

Co-authored-by: Florent Castelli <florent.castelli@gmail.com>
2022-10-12 23:07:42 +02:00

34 lines
908 B
C++

/*
* Copyright (c) 2022, Florent Castelli <florent.castelli@gmail.com>
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Format.h>
#include <Applications/Browser/WebDriverSessionClientEndpoint.h>
#include <Applications/Browser/WebDriverSessionServerEndpoint.h>
#include <LibGUI/Application.h>
#include <LibIPC/ConnectionFromClient.h>
#include <LibIPC/Encoder.h>
namespace WebDriver {
class Client;
class BrowserConnection
: public IPC::ConnectionFromClient<WebDriverSessionClientEndpoint, WebDriverSessionServerEndpoint> {
C_OBJECT_ABSTRACT(BrowserConnection)
public:
BrowserConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, NonnullRefPtr<Client> client, unsigned session_id);
virtual void die() override;
private:
NonnullRefPtr<Client> m_client;
unsigned m_session_id { 0 };
};
}