ladybird/Services/Compositor/ConnectionFromClient.h
Aliaksandr Kalenik bfc9bf80d9 Compositor+LibWebView+WebContent: Scaffold opt-in Compositor process
The compositor is moving into a dedicated helper process. That requires
a process to launch, channels for Browser and WebContent to talk to it
over, and client proxies on each side. Land all of that as an inert
scaffold first, gated behind --enable-compositor-process, so the default
rendering path is unchanged and later commits can fill in the protocol,
the service-side state, and the runtime switch against a stable target.
2026-05-22 19:50:42 +01:00

35 lines
1 KiB
C++

/*
* Copyright (c) 2026, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/HashMap.h>
#include <AK/NonnullRefPtr.h>
#include <Compositor/CompositorControlClientEndpoint.h>
#include <Compositor/CompositorControlServerEndpoint.h>
#include <Compositor/Forward.h>
#include <LibIPC/ConnectionFromClient.h>
namespace Compositor {
class ConnectionFromClient final
: public IPC::ConnectionFromClient<CompositorControlClientEndpoint, CompositorControlServerEndpoint> {
C_OBJECT(ConnectionFromClient)
public:
virtual void die() override;
private:
explicit ConnectionFromClient(NonnullOwnPtr<IPC::Transport>);
virtual Messages::CompositorControlServer::InitTransportResponse init_transport(int peer_pid) override;
virtual Messages::CompositorControlServer::ConnectWebContentResponse connect_web_content() override;
i32 m_next_web_content_connection_id { 1 };
HashMap<i32, NonnullRefPtr<ConnectionFromWebContent>> m_web_content_connections;
};
}