chromium/ui/webui/examples/renderer/render_frame_observer.cc

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

#include "ui/webui/examples/renderer/render_frame_observer.h"

#include "base/check.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "components/guest_view/common/guest_view.mojom.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 "ipc/ipc_sync_channel.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/platform/scheduler/web_agent_group_scheduler.h"
#include "third_party/blink/public/web/web_custom_element.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-external.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-local-handle.h"
#include "v8/include/v8-primitive.h"

namespace webui_examples {

namespace {

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

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

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

void RegisterWebView(const blink::LocalFrameToken& frame_token,
                     const v8::FunctionCallbackInfo<v8::Value>& args) {}

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

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

// Helper to manage the various V8 required scopes and variables.
class V8BinderContext {};

}  // namespace

RenderFrameObserver::RenderFrameObserver(content::RenderFrame* render_frame)
    :{}

RenderFrameObserver::~RenderFrameObserver() = default;

void RenderFrameObserver::SelfOwn(
    std::unique_ptr<RenderFrameObserver> this_instance) {}

void RenderFrameObserver::OnDestruct() {}

void RenderFrameObserver::DidStartNavigation(
    const GURL& url,
    std::optional<blink::WebNavigationType> navigation_type) {}

void RenderFrameObserver::ReadyToCommitNavigation(
    blink::WebDocumentLoader* document_loader) {}

}  // namespace webui_examples