chromium/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.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/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"

#include <utility>

#include "base/check_op.h"
#include "base/functional/bind.h"
#include "components/guest_view/common/guest_view_constants.h"
#include "content/public/browser/child_process_host.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/site_instance.h"
#include "content/public/common/url_constants.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_stream_manager.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_attach_helper.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_constants.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h"
#include "extensions/browser/process_manager.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/api/mime_handler_private.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/mojom/guest_view.mojom.h"
#include "extensions/strings/grit/extensions_strings.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "pdf/buildflags.h"
#include "services/service_manager/public/cpp/binder_registry.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
#include "third_party/blink/public/common/input/web_gesture_event.h"
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"

WebContents;
GuestViewBase;

namespace extensions {

StreamContainer::StreamContainer(
    int tab_id,
    bool embedded,
    const GURL& handler_url,
    const ExtensionId& extension_id,
    blink::mojom::TransferrableURLLoaderPtr transferrable_loader,
    const GURL& original_url)
    :{}

StreamContainer::~StreamContainer() {}

base::WeakPtr<StreamContainer> StreamContainer::GetWeakPtr() {}

blink::mojom::TransferrableURLLoaderPtr
StreamContainer::TakeTransferrableURLLoader() {}

// static
const char MimeHandlerViewGuest::Type[] =;
const guest_view::GuestViewHistogramValue MimeHandlerViewGuest::HistogramValue =;

// static
std::unique_ptr<GuestViewBase> MimeHandlerViewGuest::Create(
    content::RenderFrameHost* owner_rfh) {}

MimeHandlerViewGuest::MimeHandlerViewGuest(content::RenderFrameHost* owner_rfh)
    :{}

MimeHandlerViewGuest::~MimeHandlerViewGuest() {}

bool MimeHandlerViewGuest::CanBeEmbeddedInsideCrossProcessFrames() const {}

void MimeHandlerViewGuest::SetBeforeUnloadController(
    mojo::PendingRemote<mime_handler::BeforeUnloadControl>
        pending_before_unload_control) {}

const char* MimeHandlerViewGuest::GetAPINamespace() const {}

int MimeHandlerViewGuest::GetTaskPrefix() const {}

void MimeHandlerViewGuest::CreateWebContents(
    std::unique_ptr<GuestViewBase> owned_this,
    const base::Value::Dict& create_params,
    WebContentsCreatedCallback callback) {}

void MimeHandlerViewGuest::DidAttachToEmbedder() {}

void MimeHandlerViewGuest::DidInitialize(
    const base::Value::Dict& create_params) {}

void MimeHandlerViewGuest::MaybeRecreateGuestContents(
    content::RenderFrameHost* outer_contents_frame) {}

void MimeHandlerViewGuest::EmbedderFullscreenToggled(bool entered_fullscreen) {}

bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const {}

content::RenderFrameHost* MimeHandlerViewGuest::GetProspectiveOuterDocument() {}

WebContents* MimeHandlerViewGuest::OpenURLFromTab(
    WebContents* source,
    const content::OpenURLParams& params,
    base::OnceCallback<void(content::NavigationHandle&)>
        navigation_handle_callback) {}

void MimeHandlerViewGuest::NavigationStateChanged(
    WebContents* source,
    content::InvalidateTypes changed_flags) {}

bool MimeHandlerViewGuest::HandleContextMenu(
    content::RenderFrameHost& render_frame_host,
    const content::ContextMenuParams& params) {}

bool MimeHandlerViewGuest::PreHandleGestureEvent(
    WebContents* source,
    const blink::WebGestureEvent& event) {}

content::JavaScriptDialogManager*
MimeHandlerViewGuest::GetJavaScriptDialogManager(
    WebContents* source) {}

bool MimeHandlerViewGuest::PluginDoSave() {}

bool MimeHandlerViewGuest::GuestSaveFrame(
    content::WebContents* guest_web_contents) {}

bool MimeHandlerViewGuest::SaveFrame(
    const GURL& url,
    const content::Referrer& referrer,
    content::RenderFrameHost* render_frame_host) {}

void MimeHandlerViewGuest::EnterFullscreenModeForTab(
    content::RenderFrameHost* requesting_frame,
    const blink::mojom::FullscreenOptions& options) {}

void MimeHandlerViewGuest::ExitFullscreenModeForTab(content::WebContents*) {}

bool MimeHandlerViewGuest::IsFullscreenForTabOrPending(
    const content::WebContents* web_contents) {}

bool MimeHandlerViewGuest::ShouldResumeRequestsForCreatedWindow() {}

bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
    content::SiteInstance* source_site_instance,
    content::mojom::WindowContainerType window_container_type,
    const GURL& opener_url,
    const std::string& frame_name,
    const GURL& target_url) {}

content::WebContents* MimeHandlerViewGuest::CreateCustomWebContents(
    content::RenderFrameHost* opener,
    content::SiteInstance* source_site_instance,
    bool is_renderer_initiated,
    const GURL& opener_url,
    const std::string& frame_name,
    const GURL& target_url,
    const content::StoragePartitionConfig& partition_config,
    content::SessionStorageNamespace* session_storage_namespace) {}

bool MimeHandlerViewGuest::SetFullscreenState(bool is_fullscreen) {}

void MimeHandlerViewGuest::DocumentOnLoadCompletedInPrimaryMainFrame() {}

void MimeHandlerViewGuest::ReadyToCommitNavigation(
    content::NavigationHandle* navigation_handle) {}

void MimeHandlerViewGuest::DidFinishNavigation(
    content::NavigationHandle* navigation_handle) {}

void MimeHandlerViewGuest::FuseBeforeUnloadControl(
    mojo::PendingReceiver<mime_handler::BeforeUnloadControl> receiver) {}

content::RenderFrameHost* MimeHandlerViewGuest::GetEmbedderFrame() {}

base::WeakPtr<MimeHandlerViewGuest> MimeHandlerViewGuest::GetWeakPtr() {}

base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStreamWeakPtr() {}

}  // namespace extensions