chromium/extensions/renderer/api/declarative_content_hooks_delegate.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/renderer/api/declarative_content_hooks_delegate.h"

#include <string_view>

#include "base/functional/bind.h"
#include "extensions/common/api/declarative/declarative_constants.h"
#include "extensions/renderer/bindings/api_type_reference_map.h"
#include "extensions/renderer/bindings/argument_spec.h"
#include "gin/arguments.h"
#include "gin/converter.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_selector.h"
#include "v8/include/v8-container.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-exception.h"
#include "v8/include/v8-external.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-object.h"
#include "v8/include/v8-primitive.h"
#include "v8/include/v8-template.h"
#include "v8/include/v8-value.h"

namespace extensions {

namespace {

void RunDeclarativeContentHooksDelegateHandlerCallback(
    const v8::FunctionCallbackInfo<v8::Value>& info) {}

// Copies the 'own' properties from src -> dst.
bool V8Assign(v8::Local<v8::Context> context,
              v8::Local<v8::Object> src,
              v8::Local<v8::Object> dst) {}

// Canonicalizes any css selectors specified in a page state matcher, returning
// true on success.
bool CanonicalizeCssSelectors(v8::Local<v8::Context> context,
                              v8::Local<v8::Object> object,
                              std::string* error) {}

// Validates the source object against the expected spec, and copies over values
// to |this_object|. Returns true on success.
bool Validate(const ArgumentSpec* spec,
              const APITypeReferenceMap& type_refs,
              v8::Local<v8::Context> context,
              v8::Local<v8::Object> this_object,
              v8::Local<v8::Object> source_object,
              const std::string& type_name,
              std::string* error) {}

}  // namespace

DeclarativeContentHooksDelegate::DeclarativeContentHooksDelegate() = default;
DeclarativeContentHooksDelegate::~DeclarativeContentHooksDelegate() = default;

void DeclarativeContentHooksDelegate::InitializeTemplate(
    v8::Isolate* isolate,
    v8::Local<v8::ObjectTemplate> object_template,
    const APITypeReferenceMap& type_refs) {}

void DeclarativeContentHooksDelegate::HandleCall(
    const ArgumentSpec* spec,
    const APITypeReferenceMap* type_refs,
    const std::string& type_name,
    const v8::FunctionCallbackInfo<v8::Value>& info) {}

}  // namespace extensions