OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 void DidUpdateFullscreenSize() override; | 261 void DidUpdateFullscreenSize() override; |
262 | 262 |
263 float DefaultMinimumPageScaleFactor() const override; | 263 float DefaultMinimumPageScaleFactor() const override; |
264 float DefaultMaximumPageScaleFactor() const override; | 264 float DefaultMaximumPageScaleFactor() const override; |
265 float MinimumPageScaleFactor() const override; | 265 float MinimumPageScaleFactor() const override; |
266 float MaximumPageScaleFactor() const override; | 266 float MaximumPageScaleFactor() const override; |
267 float ClampPageScaleFactorToLimits(float) const override; | 267 float ClampPageScaleFactorToLimits(float) const override; |
268 void ResetScaleStateImmediately() override; | 268 void ResetScaleStateImmediately() override; |
269 | 269 |
270 HitTestResult CoreHitTestResultAt(const WebPoint&); | 270 HitTestResult CoreHitTestResultAt(const WebPoint&); |
271 void InvalidateRect(const IntRect&); | 271 void InvalidateRect(const IntRect&) override; |
272 | 272 |
273 void SetBaseBackgroundColor(WebColor) override; | 273 void SetBaseBackgroundColor(WebColor) override; |
274 void SetBaseBackgroundColorOverride(WebColor) override; | 274 void SetBaseBackgroundColorOverride(WebColor) override; |
275 void ClearBaseBackgroundColorOverride() override; | 275 void ClearBaseBackgroundColorOverride() override; |
276 void SetBackgroundColorOverride(WebColor) override; | 276 void SetBackgroundColorOverride(WebColor) override; |
277 void ClearBackgroundColorOverride() override; | 277 void ClearBackgroundColorOverride() override; |
278 void SetZoomFactorOverride(float) override; | 278 void SetZoomFactorOverride(float) override; |
279 void SetCompositorDeviceScaleFactorOverride(float) override; | 279 void SetCompositorDeviceScaleFactorOverride(float) override; |
280 void SetDeviceEmulationTransform(const TransformationMatrix&) override; | 280 void SetDeviceEmulationTransform(const TransformationMatrix&) override; |
281 TransformationMatrix GetDeviceEmulationTransformForTesting() const; | 281 TransformationMatrix GetDeviceEmulationTransformForTesting() const; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // load. isNavigationWithinPage will be true if the navigation does | 345 // load. isNavigationWithinPage will be true if the navigation does |
346 // not take the user away from the current page. | 346 // not take the user away from the current page. |
347 void DidCommitLoad(bool is_new_navigation, | 347 void DidCommitLoad(bool is_new_navigation, |
348 bool is_navigation_within_page) override; | 348 bool is_navigation_within_page) override; |
349 | 349 |
350 // Indicates two things: | 350 // Indicates two things: |
351 // 1) This view may have a new layout now. | 351 // 1) This view may have a new layout now. |
352 // 2) Calling updateAllLifecyclePhases() is a no-op. | 352 // 2) Calling updateAllLifecyclePhases() is a no-op. |
353 // After calling WebWidget::updateAllLifecyclePhases(), expect to get this | 353 // After calling WebWidget::updateAllLifecyclePhases(), expect to get this |
354 // notification unless the view did not need a layout. | 354 // notification unless the view did not need a layout. |
355 void LayoutUpdated(WebLocalFrameImpl*); | 355 void LayoutUpdated(WebLocalFrameImpl*) override; |
356 void ResizeAfterLayout(WebLocalFrameImpl*); | 356 void ResizeAfterLayout(WebLocalFrameImpl*) override; |
357 | 357 |
358 void DidChangeContentsSize() override; | 358 void DidChangeContentsSize() override; |
359 void PageScaleFactorChanged() override; | 359 void PageScaleFactorChanged() override; |
360 void MainFrameScrollOffsetChanged() override; | 360 void MainFrameScrollOffsetChanged() override; |
361 | 361 |
362 // Returns true if popup menus should be rendered by the browser, false if | 362 // Returns true if popup menus should be rendered by the browser, false if |
363 // they should be rendered by WebKit (which is the default). | 363 // they should be rendered by WebKit (which is the default). |
364 static bool UseExternalPopupMenus(); | 364 static bool UseExternalPopupMenus(); |
365 | 365 |
366 bool ShouldAutoResize() const override { return should_auto_resize_; } | 366 bool ShouldAutoResize() const override { return should_auto_resize_; } |
367 | 367 |
368 IntSize MinAutoSize() const override { return min_auto_size_; } | 368 IntSize MinAutoSize() const override { return min_auto_size_; } |
369 | 369 |
370 IntSize MaxAutoSize() const override { return max_auto_size_; } | 370 IntSize MaxAutoSize() const override { return max_auto_size_; } |
371 | 371 |
372 void UpdateMainFrameLayoutSize() override; | 372 void UpdateMainFrameLayoutSize() override; |
373 void UpdatePageDefinedViewportConstraints(const ViewportDescription&); | 373 void UpdatePageDefinedViewportConstraints( |
| 374 const ViewportDescription&) override; |
374 | 375 |
375 PagePopup* OpenPagePopup(PagePopupClient*); | 376 PagePopup* OpenPagePopup(PagePopupClient*) override; |
376 void ClosePagePopup(PagePopup*); | 377 void ClosePagePopup(PagePopup*) override; |
377 void CleanupPagePopup(); | 378 void CleanupPagePopup() override; |
378 LocalDOMWindow* PagePopupWindow() const; | 379 LocalDOMWindow* PagePopupWindow() const override; |
379 | 380 |
380 // Returns the input event we're currently processing. This is used in some | 381 // Returns the input event we're currently processing. This is used in some |
381 // cases where the WebCore DOM event doesn't have the information we need. | 382 // cases where the WebCore DOM event doesn't have the information we need. |
382 static const WebInputEvent* CurrentInputEvent() { | 383 static const WebInputEvent* CurrentInputEvent() { |
383 return current_input_event_; | 384 return current_input_event_; |
384 } | 385 } |
385 | 386 |
386 GraphicsLayer* RootGraphicsLayer(); | 387 GraphicsLayer* RootGraphicsLayer() override; |
387 void RegisterViewportLayersWithCompositor(); | 388 void RegisterViewportLayersWithCompositor() override; |
388 PaintLayerCompositor* Compositor() const; | 389 PaintLayerCompositor* Compositor() const override; |
389 CompositorAnimationTimeline* LinkHighlightsTimeline() const override { | 390 CompositorAnimationTimeline* LinkHighlightsTimeline() const override { |
390 return link_highlights_timeline_.get(); | 391 return link_highlights_timeline_.get(); |
391 } | 392 } |
392 | 393 |
393 WebViewScheduler* Scheduler() const override; | 394 WebViewScheduler* Scheduler() const override; |
394 void SetVisibilityState(WebPageVisibilityState, bool) override; | 395 void SetVisibilityState(WebPageVisibilityState, bool) override; |
395 | 396 |
396 bool HasOpenedPopup() const { return page_popup_.Get(); } | 397 bool HasOpenedPopup() const override { return page_popup_.Get(); } |
397 | 398 |
398 // Called by a full frame plugin inside this view to inform it that its | 399 // Called by a full frame plugin inside this view to inform it that its |
399 // zoom level has been updated. The plugin should only call this function | 400 // zoom level has been updated. The plugin should only call this function |
400 // if the zoom change was triggered by the browser, it's only needed in case | 401 // if the zoom change was triggered by the browser, it's only needed in case |
401 // a plugin can update its own zoom, say because of its own UI. | 402 // a plugin can update its own zoom, say because of its own UI. |
402 void FullFramePluginZoomLevelChanged(double zoom_level); | 403 void FullFramePluginZoomLevelChanged(double zoom_level); |
403 | 404 |
404 void ComputeScaleAndScrollForBlockRect( | 405 void ComputeScaleAndScrollForBlockRect( |
405 const WebPoint& hit_point, | 406 const WebPoint& hit_point, |
406 const WebRect& block_rect, | 407 const WebRect& block_rect, |
(...skipping 24 matching lines...) Expand all Loading... |
431 IntPoint FakePageScaleAnimationTargetPositionForTesting() const { | 432 IntPoint FakePageScaleAnimationTargetPositionForTesting() const { |
432 return fake_page_scale_animation_target_position_; | 433 return fake_page_scale_animation_target_position_; |
433 } | 434 } |
434 float FakePageScaleAnimationPageScaleForTesting() const { | 435 float FakePageScaleAnimationPageScaleForTesting() const { |
435 return fake_page_scale_animation_page_scale_factor_; | 436 return fake_page_scale_animation_page_scale_factor_; |
436 } | 437 } |
437 bool FakePageScaleAnimationUseAnchorForTesting() const { | 438 bool FakePageScaleAnimationUseAnchorForTesting() const { |
438 return fake_page_scale_animation_use_anchor_; | 439 return fake_page_scale_animation_use_anchor_; |
439 } | 440 } |
440 | 441 |
441 void EnterFullscreen(LocalFrame&); | 442 void EnterFullscreen(LocalFrame&) override; |
442 void ExitFullscreen(LocalFrame&); | 443 void ExitFullscreen(LocalFrame&) override; |
443 void FullscreenElementChanged(Element*, Element*); | 444 void FullscreenElementChanged(Element*, Element*) override; |
444 | 445 |
445 // Exposed for the purpose of overriding device metrics. | 446 // Exposed for the purpose of overriding device metrics. |
446 void SendResizeEventAndRepaint(); | 447 void SendResizeEventAndRepaint(); |
447 | 448 |
448 // Exposed for testing purposes. | 449 // Exposed for testing purposes. |
449 bool HasHorizontalScrollbar(); | 450 bool HasHorizontalScrollbar(); |
450 bool HasVerticalScrollbar(); | 451 bool HasVerticalScrollbar(); |
451 | 452 |
452 // Exposed for tests. | 453 // Exposed for tests. |
453 unsigned NumLinkHighlights() { return link_highlights_.size(); } | 454 unsigned NumLinkHighlights() { return link_highlights_.size(); } |
(...skipping 15 matching lines...) Expand all Loading... |
469 return matches_heuristics_for_gpu_rasterization_; | 470 return matches_heuristics_for_gpu_rasterization_; |
470 } | 471 } |
471 | 472 |
472 void UpdateBrowserControlsState(WebBrowserControlsState constraint, | 473 void UpdateBrowserControlsState(WebBrowserControlsState constraint, |
473 WebBrowserControlsState current, | 474 WebBrowserControlsState current, |
474 bool animate) override; | 475 bool animate) override; |
475 | 476 |
476 BrowserControls& GetBrowserControls(); | 477 BrowserControls& GetBrowserControls(); |
477 // Called anytime browser controls layout height or content offset have | 478 // Called anytime browser controls layout height or content offset have |
478 // changed. | 479 // changed. |
479 void DidUpdateBrowserControls(); | 480 void DidUpdateBrowserControls() override; |
480 | 481 |
481 void ForceNextWebGLContextCreationToFail() override; | 482 void ForceNextWebGLContextCreationToFail() override; |
482 void ForceNextDrawingBufferCreationToFail() override; | 483 void ForceNextDrawingBufferCreationToFail() override; |
483 | 484 |
484 CompositorWorkerProxyClient* CreateCompositorWorkerProxyClient(); | 485 CompositorWorkerProxyClient* CreateCompositorWorkerProxyClient(); |
485 AnimationWorkletProxyClient* CreateAnimationWorkletProxyClient(); | 486 AnimationWorkletProxyClient* CreateAnimationWorkletProxyClient(); |
486 | 487 |
487 IntSize MainFrameSize() override; | 488 IntSize MainFrameSize() override; |
488 WebDisplayMode DisplayMode() const override { return display_mode_; } | 489 WebDisplayMode DisplayMode() const override { return display_mode_; } |
489 | 490 |
490 PageScaleConstraintsSet& GetPageScaleConstraintsSet() const override; | 491 PageScaleConstraintsSet& GetPageScaleConstraintsSet() const override; |
491 | 492 |
492 FloatSize ElasticOverscroll() const { return elastic_overscroll_; } | 493 FloatSize ElasticOverscroll() const override { return elastic_overscroll_; } |
493 | 494 |
494 double LastFrameTimeMonotonic() const { return last_frame_time_monotonic_; } | 495 double LastFrameTimeMonotonic() const override { |
| 496 return last_frame_time_monotonic_; |
| 497 } |
495 | 498 |
496 ChromeClientImpl& ChromeClient() const { return *chrome_client_impl_.Get(); } | 499 ChromeClientImpl& ChromeClient() const { return *chrome_client_impl_.Get(); } |
497 | 500 |
498 // Returns the currently active WebInputMethodController which is the one | 501 // Returns the currently active WebInputMethodController which is the one |
499 // corresponding to the focused frame. It will return nullptr if there is no | 502 // corresponding to the focused frame. It will return nullptr if there is no |
500 // focused frame, or if the there is one but it belongs to a different local | 503 // focused frame, or if the there is one but it belongs to a different local |
501 // root. | 504 // root. |
502 WebInputMethodControllerImpl* GetActiveWebInputMethodController() const; | 505 WebInputMethodControllerImpl* GetActiveWebInputMethodController() const; |
503 | 506 |
504 void SetLastHiddenPagePopup(WebPagePopupImpl* page_popup) override { | 507 void SetLastHiddenPagePopup(WebPagePopupImpl* page_popup) override { |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 Persistent<ResizeViewportAnchor> resize_viewport_anchor_; | 747 Persistent<ResizeViewportAnchor> resize_viewport_anchor_; |
745 }; | 748 }; |
746 | 749 |
747 // We have no ways to check if the specified WebView is an instance of | 750 // We have no ways to check if the specified WebView is an instance of |
748 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 751 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
749 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 752 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
750 | 753 |
751 } // namespace blink | 754 } // namespace blink |
752 | 755 |
753 #endif | 756 #endif |
OLD | NEW |