mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +00:00
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.
38 lines
871 B
C++
38 lines
871 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 {
|
|
|
|
struct ProcessDescription {
|
|
u64 id { 0 };
|
|
bool is_parent { false };
|
|
bool is_windowless_parent { false };
|
|
};
|
|
|
|
class ProcessActor final : public Actor {
|
|
public:
|
|
static constexpr auto base_name = "process"sv;
|
|
|
|
static NonnullRefPtr<ProcessActor> create(DevToolsServer&, String name, ProcessDescription);
|
|
virtual ~ProcessActor() override;
|
|
|
|
ProcessDescription const& description() const { return m_description; }
|
|
JsonObject serialize_description() const;
|
|
|
|
private:
|
|
ProcessActor(DevToolsServer&, String name, ProcessDescription);
|
|
|
|
virtual void handle_message(Message const&) override;
|
|
|
|
ProcessDescription m_description;
|
|
};
|
|
|
|
}
|