#include "extensions/renderer/v8_schema_registry.h"
#include <stddef.h>
#include <memory>
#include <string_view>
#include <utility>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/values.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/extension_api.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/common/mojom/host_id.mojom.h"
#include "extensions/renderer/object_backed_native_handler.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/static_v8_external_one_byte_string_resource.h"
#include "extensions/renderer/v8_helpers.h"
#include "v8/include/v8-container.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-json.h"
#include "v8/include/v8-microtask-queue.h"
#include "v8/include/v8-object.h"
#include "v8/include/v8-value.h"
V8ValueConverter;
namespace extensions {
namespace {
void DeepFreeze(const v8::Local<v8::Object>& object,
const v8::Local<v8::Context>& context) { … }
class SchemaRegistryNativeHandler : public ObjectBackedNativeHandler { … };
}
V8SchemaRegistry::V8SchemaRegistry() { … }
V8SchemaRegistry::~V8SchemaRegistry() { … }
std::unique_ptr<NativeHandler> V8SchemaRegistry::AsNativeHandler(
v8::Isolate* isolate) { … }
v8::Local<v8::Array> V8SchemaRegistry::GetSchemas(
v8::Isolate* isolate,
const std::vector<std::string>& apis) { … }
v8::Local<v8::Object> V8SchemaRegistry::GetSchema(v8::Isolate* isolate,
const std::string& api) { … }
v8::Local<v8::Context> V8SchemaRegistry::GetOrCreateContext(
v8::Isolate* isolate) { … }
}