mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
To aid with debugging web page issues in Ladybird without needing to implement a fully fledged inspector, we can implement the Firefox DevTools protocol and use their DevTools. The protocol is described here: https://firefox-source-docs.mozilla.org/devtools/backend/protocol.html This commit contains just enough to connect to Ladybird from a DevTools client.
38 lines
899 B
C++
38 lines
899 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&, ByteString name, ProcessDescription);
|
|
virtual ~ProcessActor() override;
|
|
|
|
virtual void handle_message(StringView type, JsonObject const&) override;
|
|
|
|
ProcessDescription const& description() const { return m_description; }
|
|
JsonObject serialize_description() const;
|
|
|
|
private:
|
|
ProcessActor(DevToolsServer&, ByteString name, ProcessDescription);
|
|
|
|
ProcessDescription m_description;
|
|
};
|
|
|
|
}
|