chromium/ui/views/controls/webview/webview.cc

// Copyright 2012 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/views/controls/webview/webview.h"

#include <string>
#include <utility>

#include "base/no_destructor.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "ipc/ipc_message.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/platform/ax_platform_node.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/events/event.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/webview/web_contents_set_background_color.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/views_delegate.h"

namespace views {

namespace {

// This key indicates that a WebContents is used by a WebView.
const void* const kIsWebViewContentsKey =;

// A testing stub that creates web contents.
WebView::WebContentsCreator* GetCreatorForTesting() {}

// Updates the parent accessible object on the NativeView. As WebView overrides
// GetNativeViewAccessible() to return the accessible from the WebContents, it
// needs to ensure the accessible from the parent is set on the NativeView.
void UpdateNativeViewHostAccessibleParent(NativeViewHost* holder,
                                          View* parent) {}

}  // namespace

WebView::ScopedWebContentsCreatorForTesting::ScopedWebContentsCreatorForTesting(
    WebContentsCreator creator) {}

WebView::ScopedWebContentsCreatorForTesting::
    ~ScopedWebContentsCreatorForTesting() {}

////////////////////////////////////////////////////////////////////////////////
// WebView, public:

WebView::WebView(content::BrowserContext* browser_context) {}

WebView::~WebView() {}

// static
bool WebView::IsWebViewContents(const content::WebContents* web_contents) {}

content::WebContents* WebView::GetWebContents(base::Location creator_location) {}

void WebView::SetWebContents(content::WebContents* replacement) {}

content::BrowserContext* WebView::GetBrowserContext() {}

void WebView::SetBrowserContext(content::BrowserContext* browser_context) {}

void WebView::LoadInitialURL(const GURL& url,
                             HttpsUpgradePolicy https_upgrade_policy,
                             base::Location invoke_location) {}

void WebView::SetFastResize(bool fast_resize) {}

void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
                                          const gfx::Size& max_size) {}

void WebView::SetCrashedOverlayView(View* crashed_overlay_view) {}

base::CallbackListSubscription WebView::AddWebContentsAttachedCallback(
    WebContentsAttachedCallback callback) {}

////////////////////////////////////////////////////////////////////////////////
// WebView, View overrides:

void WebView::OnBoundsChanged(const gfx::Rect& previous_bounds) {}

void WebView::ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) {}

bool WebView::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {}

bool WebView::OnMousePressed(const ui::MouseEvent& event) {}

void WebView::OnFocus() {}

void WebView::AboutToRequestFocusFromTabTraversal(bool reverse) {}

void WebView::AddedToWidget() {}

void WebView::RemovedFromWidget() {}

gfx::NativeViewAccessible WebView::GetNativeViewAccessible() {}

void WebView::OnAXModeAdded(ui::AXMode mode) {}

////////////////////////////////////////////////////////////////////////////////
// WebView, content::WebContentsDelegate implementation:

////////////////////////////////////////////////////////////////////////////////
// WebView, content::WebContentsObserver implementation:

void WebView::RenderFrameCreated(content::RenderFrameHost* render_frame_host) {}

void WebView::RenderFrameDeleted(content::RenderFrameHost* render_frame_host) {}

void WebView::RenderFrameHostChanged(content::RenderFrameHost* old_host,
                                     content::RenderFrameHost* new_host) {}

void WebView::DidToggleFullscreenModeForTab(bool entered_fullscreen,
                                            bool will_cause_resize) {}

void WebView::OnWebContentsFocused(
    content::RenderWidgetHost* render_widget_host) {}

void WebView::AXTreeIDForMainFrameHasChanged() {}

void WebView::WebContentsDestroyed() {}

void WebView::ResizeDueToAutoResize(content::WebContents* source,
                                    const gfx::Size& new_size) {}

////////////////////////////////////////////////////////////////////////////////
// WebView, private:

void WebView::AttachWebContentsNativeView() {}

void WebView::DetachWebContentsNativeView() {}

void WebView::UpdateCrashedOverlayView() {}

void WebView::NotifyAccessibilityWebContentsChanged() {}

std::unique_ptr<content::WebContents> WebView::CreateWebContents(
    content::BrowserContext* browser_context,
    base::Location creator_location) {}

void WebView::SetUpNewMainFrame(content::RenderFrameHost* frame_host) {}

void WebView::LostMainFrame() {}

void WebView::MaybeEnableAutoResize(content::RenderFrameHost* frame_host) {}

BEGIN_METADATA()

}  // namespace views