serenity/Userland/Services/WebDriver/WebContentConnection.cpp
Timothy Flynn be50806a18 WebDriver: Remove "Services/" prefix from local WebDriver includes
This is to allow building some of these files from Ladybird. The Build
directory for Ladybird does not include the "Services/" path.
2022-11-14 13:43:24 -05:00

25 lines
704 B
C++

/*
* Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <WebDriver/Client.h>
#include <WebDriver/WebContentConnection.h>
namespace WebDriver {
WebContentConnection::WebContentConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, NonnullRefPtr<Client> client, unsigned session_id)
: IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint>(*this, move(socket), 1)
, m_client(move(client))
, m_session_id(session_id)
{
}
void WebContentConnection::die()
{
dbgln_if(WEBDRIVER_DEBUG, "Session {} was closed remotely. Shutting down...", m_session_id);
m_client->close_session(m_session_id);
}
}