#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 {
ViewMap;
static base::LazyInstance<ViewMap>::DestructorAtExit weak_view_map = …;
}
namespace extensions {
namespace {
content::RenderFrame* GetRenderFrame(v8::Local<v8::Value> value) { … }
class RenderFrameStatus final : public content::RenderFrameObserver { … };
}
struct GuestViewInternalCustomBindings::ViewHolder { … };
GuestViewInternalCustomBindings::GuestViewInternalCustomBindings(
ScriptContext* context)
: … { … }
GuestViewInternalCustomBindings::~GuestViewInternalCustomBindings() = default;
void GuestViewInternalCustomBindings::AddRoutes() { … }
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() { … }
}