#include "third_party/blink/renderer/core/exported/web_view_impl.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_macros.h"
#include "base/observer_list.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "cc/layers/picture_layer.h"
#include "components/viz/common/features.h"
#include "media/base/media_switches.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/history/session_history_constants.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_menu_source_type.h"
#include "third_party/blink/public/common/page/color_provider_color_maps.h"
#include "third_party/blink/public/common/page/page_zoom.h"
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
#include "third_party/blink/public/common/switches.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/mojom/frame/frame_replication_state.mojom-blink.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
#include "third_party/blink/public/mojom/page/draggable_region.mojom-blink.h"
#include "third_party/blink/public/mojom/page/prerender_page_param.mojom.h"
#include "third_party/blink/public/mojom/partitioned_popins/partitioned_popin_params.mojom.h"
#include "third_party/blink/public/mojom/window_features/window_features.mojom-blink.h"
#include "third_party/blink/public/platform/interface_registry.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_media_player.h"
#include "third_party/blink/public/platform/web_network_state_notifier.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
#include "third_party/blink/public/platform/web_text_input_info.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/web/web_autofill_client.h"
#include "third_party/blink/public/web/web_console_message.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_hit_test_result.h"
#include "third_party/blink/public/web/web_input_element.h"
#include "third_party/blink/public/web/web_local_frame_client.h"
#include "third_party/blink/public/web/web_meaningful_layout.h"
#include "third_party/blink/public/web/web_navigation_type.h"
#include "third_party/blink/public/web/web_node.h"
#include "third_party/blink/public/web/web_plugin.h"
#include "third_party/blink/public/web/web_range.h"
#include "third_party/blink/public/web/web_render_theme.h"
#include "third_party/blink/public/web/web_view_client.h"
#include "third_party/blink/public/web/web_window_features.h"
#include "third_party/blink/renderer/core/clipboard/data_object.h"
#include "third_party/blink/renderer/core/content_capture/content_capture_manager.h"
#include "third_party/blink/renderer/core/core_initializer.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/events/native_event_listener.h"
#include "third_party/blink/renderer/core/dom/layout_tree_builder_traversal.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/editor.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/ime/edit_context.h"
#include "third_party/blink/renderer/core/editing/ime/input_method_controller.h"
#include "third_party/blink/renderer/core/editing/iterators/text_iterator.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/serializers/html_interchange.h"
#include "third_party/blink/renderer/core/editing/serializers/serialization.h"
#include "third_party/blink/renderer/core/events/current_input_event.h"
#include "third_party/blink/renderer/core/events/keyboard_event.h"
#include "third_party/blink/renderer/core/events/ui_event_with_key_state.h"
#include "third_party/blink/renderer/core/events/web_input_event_conversion.h"
#include "third_party/blink/renderer/core/events/wheel_event.h"
#include "third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h"
#include "third_party/blink/renderer/core/exported/web_plugin_container_impl.h"
#include "third_party/blink/renderer/core/exported/web_settings_impl.h"
#include "third_party/blink/renderer/core/frame/browser_controls.h"
#include "third_party/blink/renderer/core/frame/dom_window.h"
#include "third_party/blink/renderer/core/frame/event_handler_registry.h"
#include "third_party/blink/renderer/core/frame/fullscreen_controller.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/page_scale_constraints_set.h"
#include "third_party/blink/renderer/core/frame/remote_frame.h"
#include "third_party/blink/renderer/core/frame/resize_viewport_anchor.h"
#include "third_party/blink/renderer/core/frame/rotation_viewport_anchor.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/viewport_data.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/frame/web_frame_widget_impl.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/frame/web_remote_frame_impl.h"
#include "third_party/blink/renderer/core/fullscreen/fullscreen.h"
#include "third_party/blink/renderer/core/html/forms/html_text_area_element.h"
#include "third_party/blink/renderer/core/html/html_plugin_element.h"
#include "third_party/blink/renderer/core/html/plugin_document.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input/context_menu_allowed_scope.h"
#include "third_party/blink/renderer/core/input/event_handler.h"
#include "third_party/blink/renderer/core/input/touch_action_util.h"
#include "third_party/blink/renderer/core/inspector/dev_tools_emulator.h"
#include "third_party/blink/renderer/core/layout/layout_embedded_content.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/text_autosizer.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/loader/frame_load_request.h"
#include "third_party/blink/renderer/core/loader/frame_loader.h"
#include "third_party/blink/renderer/core/loader/interactive_detector.h"
#include "third_party/blink/renderer/core/loader/no_state_prefetch_client.h"
#include "third_party/blink/renderer/core/page/chrome_client_impl.h"
#include "third_party/blink/renderer/core/page/context_menu_controller.h"
#include "third_party/blink/renderer/core/page/context_menu_provider.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/page/frame_tree.h"
#include "third_party/blink/renderer/core/page/link_highlight.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/page_popup_client.h"
#include "third_party/blink/renderer/core/page/pointer_lock_controller.h"
#include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h"
#include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/paint/timing/paint_timing.h"
#include "third_party/blink/renderer/core/paint/timing/paint_timing_detector.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/scroll/scroll_into_view_util.h"
#include "third_party/blink/renderer/core/scroll/scrollbar_theme.h"
#include "third_party/blink/renderer/core/speculation_rules/document_speculation_rules.h"
#include "third_party/blink/renderer/core/timing/dom_window_performance.h"
#include "third_party/blink/renderer/core/timing/performance.h"
#include "third_party/blink/renderer/core/timing/window_performance.h"
#include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h"
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
#include "third_party/blink/renderer/platform/image-decoders/image_decoder.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/keyboard_codes.h"
#include "third_party/blink/renderer/platform/loader/fetch/unique_identifier.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/scheduler/public/page_scheduler.h"
#include "third_party/blink/renderer/platform/theme/web_theme_engine_helper.h"
#include "third_party/blink/renderer/platform/weborigin/known_ports.h"
#include "third_party/blink/renderer/platform/widget/widget_base.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"
#include "third_party/icu/source/common/unicode/uscript.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/geometry/skia_conversions.h"
#if !BUILDFLAG(IS_MAC)
#include "skia/ext/legacy_display_globals.h"
#include "third_party/blink/public/platform/web_font_render_style.h"
#include "ui/gfx/font_render_params.h"
#endif
#if BUILDFLAG(IS_WIN)
#include "third_party/blink/public/web/win/web_font_rendering.h"
#endif
#undef pow
#include <cmath>
#include "build/chromeos_buildflags.h"
static const int touchPointPadding = …;
static const int nonUserInitiatedPointPadding = …;
static const float minScaleDifference = …;
static const float doubleTapZoomContentDefaultMargin = …;
static const float doubleTapZoomContentMinimumMargin = …;
static constexpr base::TimeDelta kDoubleTapZoomAnimationDuration = …;
static const float doubleTapZoomAlreadyLegibleRatio = …;
static constexpr base::TimeDelta kFindInPageAnimationDuration;
static const float viewportAnchorCoordX = …;
static const float viewportAnchorCoordY = …;
static constexpr base::TimeDelta kScrollAndScaleAnimationDuration = …;
static const int minReadableCaretHeight = …;
static const int minReadableCaretHeightForTextArea = …;
static const float minScaleChangeToTriggerZoom = …;
static const float leftBoxRatio = …;
static const int caretPadding = …;
namespace blink {
EffectiveConnectionType;
const double WebView::kMinTextSizeMultiplier = …;
const double WebView::kMaxTextSizeMultiplier = …;
HashSet<WebViewImpl*>& WebViewImpl::AllInstances() { … }
static bool g_should_use_external_popup_menus = …;
void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { … }
bool WebViewImpl::UseExternalPopupMenus() { … }
namespace {
class EmptyEventListener final : public NativeEventListener { … };
SetFontFamilyWrapper;
void SetStandardFontFamilyWrapper(WebSettings* settings,
const std::u16string& font,
UScriptCode script) { … }
void SetFixedFontFamilyWrapper(WebSettings* settings,
const std::u16string& font,
UScriptCode script) { … }
void SetSerifFontFamilyWrapper(WebSettings* settings,
const std::u16string& font,
UScriptCode script) { … }
void SetSansSerifFontFamilyWrapper(WebSettings* settings,
const std::u16string& font,
UScriptCode script) { … }
void SetCursiveFontFamilyWrapper(WebSettings* settings,
const std::u16string& font,
UScriptCode script) { … }
void SetFantasyFontFamilyWrapper(WebSettings* settings,
const std::u16string& font,
UScriptCode script) { … }
void SetMathFontFamilyWrapper(WebSettings* settings,
const std::u16string& font,
UScriptCode script) { … }
UScriptCode GetScriptForWebSettings(UScriptCode scriptCode) { … }
void ApplyFontsFromMap(const web_pref::ScriptFontFamilyMap& map,
SetFontFamilyWrapper setter,
WebSettings* settings) { … }
void ApplyCommandLineToSettings(WebSettings* settings) { … }
ui::mojom::blink::WindowOpenDisposition NavigationPolicyToDisposition(
NavigationPolicy policy) { … }
void RecordPrerenderActivationSignalDelay(const String& metric_suffix) { … }
#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN)
SkFontHinting RendererPreferencesToSkiaHinting(
const blink::RendererPreferences& prefs) { … }
#endif
void ForEachFrameWidgetControlledByView(
WebViewImpl& web_view,
base::FunctionRef<void(WebFrameWidgetImpl*)> callback) { … }
void MaybePreloadSystemFonts(Page* page) { … }
}
WebView* WebView::Create(
WebViewClient* client,
bool is_hidden,
blink::mojom::PrerenderParamPtr prerender_param,
std::optional<blink::FencedFrame::DeprecatedFencedFrameMode>
fenced_frame_mode,
bool compositing_enabled,
bool widgets_never_composited,
WebView* opener,
CrossVariantMojoAssociatedReceiver<mojom::PageBroadcastInterfaceBase>
page_handle,
scheduler::WebAgentGroupScheduler& agent_group_scheduler,
const SessionStorageNamespaceId& session_storage_namespace_id,
std::optional<SkColor> page_base_background_color,
const BrowsingContextGroupInfo& browsing_context_group_info,
const ColorProviderColorMaps* color_provider_colors,
blink::mojom::PartitionedPopinParamsPtr partitioned_popin_params) { … }
WebViewImpl* WebViewImpl::Create(
WebViewClient* client,
mojom::blink::PageVisibilityState visibility,
blink::mojom::PrerenderParamPtr prerender_param,
std::optional<blink::FencedFrame::DeprecatedFencedFrameMode>
fenced_frame_mode,
bool compositing_enabled,
bool widgets_never_composited,
WebViewImpl* opener,
mojo::PendingAssociatedReceiver<mojom::blink::PageBroadcast> page_handle,
blink::scheduler::WebAgentGroupScheduler& agent_group_scheduler,
const SessionStorageNamespaceId& session_storage_namespace_id,
std::optional<SkColor> page_base_background_color,
const BrowsingContextGroupInfo& browsing_context_group_info,
const ColorProviderColorMaps* color_provider_colors,
blink::mojom::PartitionedPopinParamsPtr partitioned_popin_params) { … }
size_t WebView::GetWebViewCount() { … }
void WebView::UpdateVisitedLinkState(uint64_t link_hash) { … }
void WebView::ResetVisitedLinkState(bool invalidate_visited_link_hashes) { … }
void WebViewImpl::SetNoStatePrefetchClient(
WebNoStatePrefetchClient* no_state_prefetch_client) { … }
void WebViewImpl::CloseWindow() { … }
WebViewImpl::WebViewImpl(
WebViewClient* client,
mojom::blink::PageVisibilityState visibility,
blink::mojom::PrerenderParamPtr prerender_param,
std::optional<blink::FencedFrame::DeprecatedFencedFrameMode>
fenced_frame_mode,
bool does_composite,
bool widgets_never_composited,
WebViewImpl* opener,
mojo::PendingAssociatedReceiver<mojom::blink::PageBroadcast> page_handle,
blink::scheduler::WebAgentGroupScheduler& agent_group_scheduler,
const SessionStorageNamespaceId& session_storage_namespace_id,
std::optional<SkColor> page_base_background_color,
const BrowsingContextGroupInfo& browsing_context_group_info,
const ColorProviderColorMaps* color_provider_colors,
blink::mojom::PartitionedPopinParamsPtr partitioned_popin_params)
: … { … }
WebViewImpl::~WebViewImpl() { … }
void WebViewImpl::SetTabKeyCyclesThroughElements(bool value) { … }
bool WebViewImpl::StartPageScaleAnimation(const gfx::Point& target_position,
bool use_anchor,
float new_scale,
base::TimeDelta duration) { … }
void WebViewImpl::EnableFakePageScaleAnimationForTesting(bool enable) { … }
void WebViewImpl::AcceptLanguagesChanged() { … }
gfx::Rect WebViewImpl::WidenRectWithinPageBounds(const gfx::Rect& source,
int target_margin,
int minimum_margin) { … }
float WebViewImpl::MaximumLegiblePageScale() const { … }
void WebViewImpl::ComputeScaleAndScrollForBlockRect(
const gfx::Point& hit_point_in_root_frame,
const gfx::Rect& block_rect_in_root_frame,
float padding,
float default_scale_when_already_legible,
float& scale,
gfx::Point& scroll) { … }
static Node* FindLinkHighlightAncestor(Node* node) { … }
Node* WebViewImpl::BestTapNode(
const GestureEventWithHitTestResults& targeted_tap_event) { … }
void WebViewImpl::EnableTapHighlightAtPoint(
const GestureEventWithHitTestResults& targeted_tap_event) { … }
void WebViewImpl::AnimateDoubleTapZoom(const gfx::Point& point_in_root_frame,
const gfx::Rect& rect_to_zoom) { … }
void WebViewImpl::ZoomToFindInPageRect(const gfx::Rect& rect_in_root_frame) { … }
#if !BUILDFLAG(IS_MAC)
WebInputEventResult WebViewImpl::SendContextMenuEvent() { … }
#else
WebInputEventResult WebViewImpl::SendContextMenuEvent() {
return WebInputEventResult::kNotHandled;
}
#endif
WebPagePopupImpl* WebViewImpl::OpenPagePopup(PagePopupClient* client) { … }
void WebViewImpl::CancelPagePopup() { … }
void WebViewImpl::ClosePagePopup(PagePopup* popup) { … }
void WebViewImpl::CleanupPagePopup() { … }
void WebViewImpl::UpdatePagePopup() { … }
void WebViewImpl::EnablePopupMouseWheelEventListener(
WebLocalFrameImpl* local_root) { … }
void WebViewImpl::DisablePopupMouseWheelEventListener() { … }
LocalDOMWindow* WebViewImpl::PagePopupWindow() const { … }
Frame* WebViewImpl::FocusedCoreFrame() const { … }
void WebViewImpl::Close() { … }
gfx::Size WebViewImpl::Size() { … }
void WebViewImpl::ResizeVisualViewport(const gfx::Size& new_size) { … }
void WebViewImpl::DidFirstVisuallyNonEmptyPaint() { … }
void WebViewImpl::UpdateICBAndResizeViewport(
const gfx::Size& visible_viewport_size) { … }
void WebViewImpl::UpdateBrowserControlsConstraint(
cc::BrowserControlsState constraint) { … }
void WebViewImpl::DidUpdateBrowserControls() { … }
BrowserControls& WebViewImpl::GetBrowserControls() { … }
void WebViewImpl::ResizeViewWhileAnchored(
cc::BrowserControlsParams params,
const gfx::Size& visible_viewport_size) { … }
void WebViewImpl::ResizeWithBrowserControls(
const gfx::Size& new_size,
float top_controls_height,
float bottom_controls_height,
bool browser_controls_shrink_layout) { … }
void WebViewImpl::ResizeWithBrowserControls(
const gfx::Size& main_frame_widget_size,
const gfx::Size& visible_viewport_size,
cc::BrowserControlsParams browser_controls_params) { … }
void WebViewImpl::Resize(const gfx::Size& new_size) { … }
void WebViewImpl::SetScreenOrientationOverrideForTesting(
std::optional<display::mojom::blink::ScreenOrientation> orientation) { … }
void WebViewImpl::SetWindowRectSynchronouslyForTesting(
const gfx::Rect& new_window_rect) { … }
std::optional<display::mojom::blink::ScreenOrientation>
WebViewImpl::ScreenOrientationOverride() { … }
void WebViewImpl::DidEnterFullscreen() { … }
void WebViewImpl::DidExitFullscreen() { … }
void WebViewImpl::SetMainFrameViewWidget(WebFrameWidgetImpl* widget) { … }
void WebViewImpl::SetMouseOverURL(const KURL& url) { … }
void WebViewImpl::SetKeyboardFocusURL(const KURL& url) { … }
WebFrameWidgetImpl* WebViewImpl::MainFrameViewWidget() { … }
void WebViewImpl::PaintContent(cc::PaintCanvas* canvas, const gfx::Rect& rect) { … }
void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
WebView* web_view) { … }
void WebViewImpl::ThemeChanged() { … }
void WebViewImpl::EnterFullscreen(LocalFrame& frame,
const FullscreenOptions* options,
FullscreenRequestType request_type) { … }
void WebViewImpl::ExitFullscreen(LocalFrame& frame) { … }
void WebViewImpl::FullscreenElementChanged(Element* old_element,
Element* new_element,
const FullscreenOptions* options,
FullscreenRequestType request_type) { … }
bool WebViewImpl::HasHorizontalScrollbar() { … }
bool WebViewImpl::HasVerticalScrollbar() { … }
void WebViewImpl::SetPageFocus(bool enable) { … }
WebSettingsImpl* WebViewImpl::SettingsImpl() { … }
WebSettings* WebViewImpl::GetSettings() { … }
WebString WebViewImpl::PageEncoding() const { … }
WebFrame* WebViewImpl::MainFrame() { … }
const WebFrame* WebViewImpl::MainFrame() const { … }
WebLocalFrameImpl* WebViewImpl::MainFrameImpl() const { … }
std::string WebViewImpl::GetNullFrameReasonForBug1139104() const { … }
void WebViewImpl::DidAttachLocalMainFrame() { … }
void WebViewImpl::DidAttachRemoteMainFrame(
CrossVariantMojoAssociatedRemote<
mojom::blink::RemoteMainFrameHostInterfaceBase> main_frame_host,
CrossVariantMojoAssociatedReceiver<
mojom::blink::RemoteMainFrameInterfaceBase> main_frame) { … }
void WebViewImpl::DidDetachLocalMainFrame() { … }
void WebViewImpl::DidDetachRemoteMainFrame() { … }
WebLocalFrame* WebViewImpl::FocusedFrame() { … }
void WebViewImpl::SetFocusedFrame(WebFrame* frame) { … }
void WebViewImpl::FinishScrollFocusedEditableIntoView(
const gfx::RectF& caret_rect_in_root_frame,
mojom::blink::ScrollIntoViewParamsPtr params) { … }
void WebViewImpl::SmoothScroll(int target_x,
int target_y,
base::TimeDelta duration) { … }
void WebViewImpl::ComputeScaleAndScrollForEditableElementRects(
const gfx::Rect& element_bounds_in_root_frame,
const gfx::Rect& caret_bounds_in_root_frame,
bool zoom_into_legible_scale,
float& new_scale,
gfx::Point& new_scroll_position,
bool& need_animation) { … }
void WebViewImpl::AdvanceFocus(bool reverse) { … }
double WebViewImpl::ClampZoomLevel(double zoom_level) const { … }
double WebViewImpl::ZoomLevelToZoomFactor(double zoom_level) const { … }
void WebViewImpl::UpdateWidgetZoomFactors() { … }
void WebViewImpl::UpdateInspectorDeviceScaleFactorOverride() { … }
float WebViewImpl::PageScaleFactor() const { … }
float WebViewImpl::ClampPageScaleFactorToLimits(float scale_factor) const { … }
void WebViewImpl::SetVisualViewportOffset(const gfx::PointF& offset) { … }
gfx::PointF WebViewImpl::VisualViewportOffset() const { … }
gfx::SizeF WebViewImpl::VisualViewportSize() const { … }
void WebViewImpl::SetPageScaleFactorAndLocation(float scale_factor,
bool is_pinch_gesture_active,
const gfx::PointF& location) { … }
void WebViewImpl::SetPageScaleFactor(float scale_factor) { … }
void WebViewImpl::SetZoomFactorForDeviceScaleFactor(
float zoom_factor_for_device_scale_factor) { … }
void WebViewImpl::SetPageLifecycleStateFromNewPageCommit(
mojom::blink::PageVisibilityState visibility,
mojom::blink::PagehideDispatch pagehide_dispatch) { … }
void WebViewImpl::SetPageLifecycleState(
mojom::blink::PageLifecycleStatePtr state,
mojom::blink::PageRestoreParamsPtr page_restore_params,
SetPageLifecycleStateCallback callback) { … }
bool IsRestoredFromBackForwardCache(
const mojom::blink::PageLifecycleStatePtr& old_state,
const mojom::blink::PageLifecycleStatePtr& new_state) { … }
void WebViewImpl::SetPageLifecycleStateInternal(
mojom::blink::PageLifecycleStatePtr new_state,
mojom::blink::PageRestoreParamsPtr page_restore_params) { … }
void WebViewImpl::UpdateViewTransitionState(
bool restoring_from_bfcache,
bool storing_in_bfcache,
const mojom::blink::PageRestoreParamsPtr& page_restore_params) { … }
void WebViewImpl::ReportActiveSchedulerTrackedFeatures() { … }
void WebViewImpl::AudioStateChanged(bool is_audio_playing) { … }
void WebViewImpl::RemoveFocusAndTextInputState() { … }
void WebViewImpl::DispatchPagehide(
mojom::blink::PagehideDispatch pagehide_dispatch) { … }
void WebViewImpl::DispatchPersistedPageshow(base::TimeTicks navigation_start) { … }
void WebViewImpl::HookBackForwardCacheEviction(bool hook) { … }
void WebViewImpl::EnableAutoResizeMode(const gfx::Size& min_size,
const gfx::Size& max_size) { … }
void WebViewImpl::DisableAutoResizeMode() { … }
bool WebViewImpl::AutoResizeMode() { … }
void WebViewImpl::EnableAutoResizeForTesting(const gfx::Size& min_window_size,
const gfx::Size& max_window_size) { … }
void WebViewImpl::DisableAutoResizeForTesting(
const gfx::Size& new_window_size) { … }
void WebViewImpl::SetDefaultPageScaleLimits(float min_scale, float max_scale) { … }
void WebViewImpl::SetInitialPageScaleOverride(
float initial_page_scale_factor_override) { … }
void WebViewImpl::SetMaximumLegibleScale(float maximum_legible_scale) { … }
void WebViewImpl::SetIgnoreViewportTagScaleLimits(bool ignore) { … }
gfx::Size WebViewImpl::MainFrameSize() { … }
PageScaleConstraintsSet& WebViewImpl::GetPageScaleConstraintsSet() const { … }
void WebViewImpl::RefreshPageScaleFactor() { … }
void WebViewImpl::UpdatePageDefinedViewportConstraints(
const ViewportDescription& description) { … }
void WebViewImpl::UpdateMainFrameLayoutSize() { … }
gfx::Size WebViewImpl::ContentsSize() const { … }
gfx::Size WebViewImpl::ContentsPreferredMinimumSize() { … }
void WebViewImpl::UpdatePreferredSize() { … }
void WebViewImpl::EnablePreferredSizeChangedMode() { … }
void WebViewImpl::Focus() { … }
void WebViewImpl::TakeFocus(bool reverse) { … }
void WebViewImpl::Show(const LocalFrameToken& opener_frame_token,
NavigationPolicy policy,
const gfx::Rect& requested_rect,
const gfx::Rect& adjusted_rect,
bool opened_by_user_gesture) { … }
void WebViewImpl::DidShowCreatedWindow() { … }
void WebViewImpl::SendWindowRectToMainFrameHost(
const gfx::Rect& bounds,
base::OnceClosure ack_callback) { … }
void WebViewImpl::DidAccessInitialMainDocument() { … }
void WebViewImpl::Minimize() { … }
void WebViewImpl::Maximize() { … }
void WebViewImpl::Restore() { … }
void WebViewImpl::SetResizable(bool resizable) { … }
void WebViewImpl::UpdateTargetURL(const WebURL& url,
const WebURL& fallback_url) { … }
void WebViewImpl::SendUpdatedTargetURLToBrowser(const KURL& target_url) { … }
void WebViewImpl::TargetURLUpdatedInBrowser() { … }
float WebViewImpl::DefaultMinimumPageScaleFactor() const { … }
float WebViewImpl::DefaultMaximumPageScaleFactor() const { … }
float WebViewImpl::MinimumPageScaleFactor() const { … }
float WebViewImpl::MaximumPageScaleFactor() const { … }
void WebViewImpl::ResetScaleStateImmediately() { … }
void WebViewImpl::ResetScrollAndScaleState() { … }
void WebViewImpl::SendResizeEventForMainFrame() { … }
void WebViewImpl::ConfigureAutoResizeMode() { … }
void WebViewImpl::SetCompositorDeviceScaleFactorOverride(
float device_scale_factor) { … }
void WebViewImpl::SetDeviceEmulationTransform(const gfx::Transform& transform) { … }
gfx::Transform WebViewImpl::GetDeviceEmulationTransform() const { … }
void WebViewImpl::EnableDeviceEmulation(const DeviceEmulationParams& params) { … }
void WebViewImpl::ActivateDevToolsTransform(
const DeviceEmulationParams& params) { … }
void WebViewImpl::DisableDeviceEmulation() { … }
void WebViewImpl::DeactivateDevToolsTransform() { … }
void WebViewImpl::PerformCustomContextMenuAction(unsigned action) { … }
void WebViewImpl::DidCloseContextMenu() { … }
SkColor WebViewImpl::BackgroundColor() const { … }
Color WebViewImpl::BaseBackgroundColor() const { … }
void WebViewImpl::SetPageBaseBackgroundColor(std::optional<SkColor> color) { … }
void WebViewImpl::UpdateColorProviders(
const ColorProviderColorMaps& color_provider_colors) { … }
void WebViewImpl::SetBaseBackgroundColorOverrideTransparent(
bool override_to_transparent) { … }
void WebViewImpl::SetBaseBackgroundColorOverrideForInspector(
std::optional<SkColor> optional_color) { … }
void WebViewImpl::UpdateBaseBackgroundColor() { … }
void WebViewImpl::UpdateFontRenderingFromRendererPrefs() { … }
void WebViewImpl::ActivatePrerenderedPage(
mojom::blink::PrerenderPageActivationParamsPtr
prerender_page_activation_params,
ActivatePrerenderedPageCallback callback) { … }
void WebViewImpl::RegisterRendererPreferenceWatcher(
CrossVariantMojoRemote<mojom::RendererPreferenceWatcherInterfaceBase>
watcher) { … }
void WebViewImpl::SetRendererPreferences(
const RendererPreferences& preferences) { … }
const RendererPreferences& WebViewImpl::GetRendererPreferences() const { … }
void WebViewImpl::UpdateRendererPreferences(
const RendererPreferences& preferences) { … }
void WebViewImpl::SetHistoryOffsetAndLength(int32_t history_offset,
int32_t history_length) { … }
void WebViewImpl::SetHistoryListFromNavigation(
int32_t history_offset,
std::optional<int32_t> history_length) { … }
void WebViewImpl::IncreaseHistoryListFromNavigation() { … }
int32_t WebViewImpl::HistoryBackListCount() const { … }
int32_t WebViewImpl::HistoryForwardListCount() const { … }
void WebViewImpl::SetWebPreferences(
const web_pref::WebPreferences& preferences) { … }
const web_pref::WebPreferences& WebViewImpl::GetWebPreferences() { … }
void WebViewImpl::UpdateWebPreferences(
const blink::web_pref::WebPreferences& preferences) { … }
void WebViewImpl::AddObserver(WebViewObserver* observer) { … }
void WebViewImpl::RemoveObserver(WebViewObserver* observer) { … }
void WebViewImpl::SetIsActive(bool active) { … }
bool WebViewImpl::IsActive() const { … }
void WebViewImpl::SetWindowFeatures(const WebWindowFeatures& features) { … }
void WebViewImpl::SetOpenedByDOM() { … }
void WebViewImpl::DidCommitLoad(bool is_new_navigation,
bool is_navigation_within_page) { … }
void WebViewImpl::DidCommitCompositorFrameForLocalMainFrame() { … }
void WebViewImpl::ResizeAfterLayout() { … }
void WebViewImpl::MainFrameLayoutUpdated() { … }
void WebViewImpl::DidChangeContentsSize() { … }
void WebViewImpl::PageScaleFactorChanged() { … }
void WebViewImpl::OutermostMainFrameScrollOffsetChanged() { … }
void WebViewImpl::TextAutosizerPageInfoChanged(
const mojom::blink::TextAutosizerPageInfo& page_info) { … }
void WebViewImpl::SetBackgroundColorOverrideForFullscreenController(
std::optional<SkColor> optional_color) { … }
void WebViewImpl::SetZoomFactorOverride(float zoom_factor) { … }
Element* WebViewImpl::FocusedElement() const { … }
WebHitTestResult WebViewImpl::HitTestResultForTap(
const gfx::Point& tap_point_window_pos,
const gfx::Size& tap_area) { … }
void WebViewImpl::SetTabsToLinks(bool enable) { … }
bool WebViewImpl::TabsToLinks() const { … }
void WebViewImpl::DidChangeRootLayer(bool root_layer_exists) { … }
void WebViewImpl::InvalidateContainer() { … }
void WebViewImpl::ApplyViewportChanges(const ApplyViewportChangesArgs& args) { … }
Node* WebViewImpl::FindNodeFromScrollableCompositorElementId(
cc::ElementId element_id) const { … }
void WebViewImpl::UpdateDeviceEmulationTransform() { … }
PageScheduler* WebViewImpl::Scheduler() const { … }
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) { … }
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() { … }
LocalFrame* WebViewImpl::FocusedLocalFrameInWidget() const { … }
void WebViewImpl::SetPageFrozen(bool frozen) { … }
WebFrameWidget* WebViewImpl::MainFrameWidget() { … }
void WebViewImpl::AddAutoplayFlags(int32_t value) { … }
void WebViewImpl::ClearAutoplayFlags() { … }
int32_t WebViewImpl::AutoplayFlagsForTest() const { … }
gfx::Size WebViewImpl::GetPreferredSizeForTest() { … }
void WebViewImpl::StopDeferringMainFrameUpdate() { … }
void WebViewImpl::SetDeviceColorSpaceForTesting(
const gfx::ColorSpace& color_space) { … }
const SessionStorageNamespaceId& WebViewImpl::GetSessionStorageNamespaceId() { … }
bool WebViewImpl::IsFencedFrameRoot() const { … }
void WebViewImpl::SetSupportsDraggableRegions(bool supports_draggable_regions) { … }
bool WebViewImpl::SupportsDraggableRegions() { … }
void WebViewImpl::DraggableRegionsChanged() { … }
void WebViewImpl::MojoDisconnected() { … }
void WebViewImpl::CreateRemoteMainFrame(
const RemoteFrameToken& frame_token,
const std::optional<FrameToken>& opener_frame_token,
mojom::blink::FrameReplicationStatePtr replicated_state,
bool is_loading,
const base::UnguessableToken& devtools_frame_token,
mojom::blink::RemoteFrameInterfacesFromBrowserPtr remote_frame_interfaces,
mojom::blink::RemoteMainFrameInterfacesPtr remote_main_frame_interfaces) { … }
scheduler::WebAgentGroupScheduler& WebViewImpl::GetWebAgentGroupScheduler() { … }
void WebViewImpl::UpdatePageBrowsingContextGroup(
const BrowsingContextGroupInfo& browsing_context_group_info) { … }
void WebViewImpl::SetPageAttributionSupport(
network::mojom::AttributionSupport support) { … }
}