ladybird/Userland/Services/WebDriver/WebContentConnection.cpp
Aliaksandr Kalenik 16a4949e33 WebDriver: Fix handling of disconnected WebContent process
If WebContent process got disconnected it is only necessary to remove
associated window instead of terminating the entire session.
2023-03-19 14:51:40 +01:00

24 lines
483 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::LocalSocket> socket)
: IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint>(*this, move(socket), 1)
{
}
void WebContentConnection::die()
{
if (on_close)
on_close();
}
}