1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibDevTools/Actors/RootActor.h
Timothy Flynn 24a5e4e7d5 LibDevTools: Move message data into a structure
This is to prepare for an upcoming change where we will need to track
replies to messages by ID. We will be able to add parameters to this
structure without having to edit every single actor subclass header
file.
2025-03-13 16:56:28 -04:00

33 lines
866 B
C++

/*
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/NonnullRefPtr.h>
#include <LibDevTools/Actor.h>
namespace DevTools {
class RootActor final : public Actor {
public:
static constexpr auto base_name = "root"sv;
static NonnullRefPtr<RootActor> create(DevToolsServer&, String name);
virtual ~RootActor() override;
void send_tab_list_changed_message();
private:
RootActor(DevToolsServer&, String name);
virtual void handle_message(Message const&) override;
// https://firefox-source-docs.mozilla.org/devtools/backend/protocol.html#the-request-reply-notify-pattern
// the root actor sends at most one "tabListChanged" notification after each "listTabs" request.
bool m_has_sent_tab_list_changed_since_last_list_tabs_request { false };
};
}