summaryrefslogtreecommitdiff
path: root/Userland/Services/WebDriver/WebContentConnection.h
blob: b65d4b3f473ebe2f97d93645e72d0e0ac775e090 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibCore/Stream.h>
#include <LibIPC/ConnectionFromClient.h>
#include <Services/WebContent/WebDriverClientEndpoint.h>
#include <Services/WebContent/WebDriverServerEndpoint.h>

namespace WebDriver {

class Client;

class WebContentConnection
    : public IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint> {
    C_OBJECT_ABSTRACT(WebContentConnection)
public:
    WebContentConnection(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 };
};

}