LibDevTools: Introduce a Firefox DevTools server library

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.
This commit is contained in:
Timothy Flynn 2025-02-15 07:35:58 -05:00 committed by Tim Flynn
commit 58bc44ba2a
Notes: github-actions[bot] 2025-02-19 13:47:24 +00:00
20 changed files with 947 additions and 0 deletions

View file

@ -0,0 +1,27 @@
/*
* 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 PreferenceActor final : public Actor {
public:
static constexpr auto base_name = "preference"sv;
static NonnullRefPtr<PreferenceActor> create(DevToolsServer&, ByteString name);
virtual ~PreferenceActor() override;
virtual void handle_message(StringView type, JsonObject const&) override;
private:
PreferenceActor(DevToolsServer&, ByteString name);
};
}