ladybird/Libraries/LibDevTools/StorageHelpers.h
Sam Atkins cb47dbfc7a LibDevTools+LibWeb: Show IndexedDB in DevTools
Firefox asks the storage watcher for an indexed-db resource before it
shows IndexedDB entries in the Storage panel. Add an IndexedDB actor and
serialize the live LibWeb database registry on demand, so WebContent can
return the host tree and table rows without duplicating database state.

Use the LibWeb inspection helpers to read IndexedDB internals, and keep
the Firefox protocol shape in LibDevTools. WebContent only forwards the
serialized response over the existing DevTools IPC path.
2026-06-19 14:25:39 +02:00

33 lines
807 B
C++

/*
* Copyright (c) 2026, Ladybird contributors
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
#include <AK/JsonObject.h>
#include <AK/Optional.h>
#include <AK/String.h>
#include <LibDevTools/Forward.h>
#include <LibURL/Forward.h>
namespace DevTools {
DEVTOOLS_API Optional<String> storage_host_for_url(String const&);
DEVTOOLS_API Optional<String> storage_host_for_url(URL::URL const& url);
DEVTOOLS_API Optional<String> storage_host_name(String const&);
enum class StorageFieldType : u8 {
Immutable,
Mutable,
Hidden,
Private,
};
JsonObject define_storage_field(StringView name, StorageFieldType);
JsonObject to_storage_operation_result(Optional<String> const& error_string);
JsonObject to_storage_operation_result(ErrorOr<void> const& result);
}