chromium/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc

// Copyright 2014 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/guest_view/guest_view_internal_custom_bindings.h"

#include <string>
#include <utility>

#include "base/functional/bind.h"
#include "base/lazy_instance.h"
#include "components/guest_view/common/guest_view_constants.h"
#include "components/guest_view/renderer/guest_view_container.h"
#include "components/guest_view/renderer/guest_view_request.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/extension.h"
#include "extensions/renderer/script_context.h"
#include "ipc/ipc_sync_channel.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom.h"
#include "third_party/blink/public/web/web_custom_element.h"
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_remote_frame.h"
#include "third_party/blink/public/web/web_view.h"
#include "v8/include/v8.h"

V8ValueConverter;

namespace {

// A map from view instance ID to view object (stored via weak V8 reference).
// Views are registered into this map via
// GuestViewInternalCustomBindings::RegisterView(), and accessed via
// GuestViewInternalCustomBindings::GetViewFromID().
ViewMap;
static base::LazyInstance<ViewMap>::DestructorAtExit weak_view_map =;

}  // namespace

namespace extensions {

namespace {

content::RenderFrame* GetRenderFrame(v8::Local<v8::Value> value) {}

class RenderFrameStatus final : public content::RenderFrameObserver {};

}  // namespace

struct GuestViewInternalCustomBindings::ViewHolder {};

GuestViewInternalCustomBindings::GuestViewInternalCustomBindings(
    ScriptContext* context)
    :{}

GuestViewInternalCustomBindings::~GuestViewInternalCustomBindings() = default;

void GuestViewInternalCustomBindings::AddRoutes() {}

// static
void GuestViewInternalCustomBindings::ResetMapEntry(
    const v8::WeakCallbackInfo<ViewHolder>& data) {}

void GuestViewInternalCustomBindings::AttachIframeGuest(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void GuestViewInternalCustomBindings::GetFrameToken(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void GuestViewInternalCustomBindings::DestroyContainer(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void GuestViewInternalCustomBindings::GetViewFromID(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void GuestViewInternalCustomBindings::RegisterDestructionCallback(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void GuestViewInternalCustomBindings::RegisterView(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void GuestViewInternalCustomBindings::RunWithGesture(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

void GuestViewInternalCustomBindings::AllowGuestViewElementDefinition(
    const v8::FunctionCallbackInfo<v8::Value>& args) {}

guest_view::mojom::GuestViewHost*
GuestViewInternalCustomBindings::GetGuestViewHost() {}

}  // namespace extensions