Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(909)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity) overr ide; 360 bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity) overr ide;
361 361
362 // Handles context menu events orignated via the the keyboard. These 362 // Handles context menu events orignated via the the keyboard. These
363 // include the VK_APPS virtual key and the Shift+F10 combine. Code is 363 // include the VK_APPS virtual key and the Shift+F10 combine. Code is
364 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM 364 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM
365 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only 365 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only
366 // significant change in this function is the code to convert from a 366 // significant change in this function is the code to convert from a
367 // Keyboard event to the Right Mouse button down event. 367 // Keyboard event to the Right Mouse button down event.
368 WebInputEventResult sendContextMenuEvent(const WebKeyboardEvent&); 368 WebInputEventResult sendContextMenuEvent(const WebKeyboardEvent&);
369 369
370 void showContextMenuAtPoint(float x, float y, PassRefPtrWillBeRawPtr<Context MenuProvider>); 370 void showContextMenuAtPoint(float x, float y, RawPtr<ContextMenuProvider>);
371 371
372 void showContextMenuForElement(WebElement); 372 void showContextMenuForElement(WebElement);
373 373
374 // Notifies the WebView that a load has been committed. isNewNavigation 374 // Notifies the WebView that a load has been committed. isNewNavigation
375 // will be true if a new session history item should be created for that 375 // will be true if a new session history item should be created for that
376 // load. isNavigationWithinPage will be true if the navigation does 376 // load. isNavigationWithinPage will be true if the navigation does
377 // not take the user away from the current page. 377 // not take the user away from the current page.
378 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage); 378 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage);
379 379
380 void postLayoutResize(WebLocalFrameImpl* webframe); 380 void postLayoutResize(WebLocalFrameImpl* webframe);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 // Called by a full frame plugin inside this view to inform it that its 458 // Called by a full frame plugin inside this view to inform it that its
459 // zoom level has been updated. The plugin should only call this function 459 // zoom level has been updated. The plugin should only call this function
460 // if the zoom change was triggered by the browser, it's only needed in case 460 // if the zoom change was triggered by the browser, it's only needed in case
461 // a plugin can update its own zoom, say because of its own UI. 461 // a plugin can update its own zoom, say because of its own UI.
462 void fullFramePluginZoomLevelChanged(double zoomLevel); 462 void fullFramePluginZoomLevelChanged(double zoomLevel);
463 463
464 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, const WebRe ct& blockRect, float padding, float defaultScaleWhenAlreadyLegible, float& scale , WebPoint& scroll); 464 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, const WebRe ct& blockRect, float padding, float defaultScaleWhenAlreadyLegible, float& scale , WebPoint& scroll);
465 Node* bestTapNode(const GestureEventWithHitTestResults& targetedTapEvent); 465 Node* bestTapNode(const GestureEventWithHitTestResults& targetedTapEvent);
466 void enableTapHighlightAtPoint(const GestureEventWithHitTestResults& targete dTapEvent); 466 void enableTapHighlightAtPoint(const GestureEventWithHitTestResults& targete dTapEvent);
467 void enableTapHighlights(WillBeHeapVector<RawPtrWillBeMember<Node>>&); 467 void enableTapHighlights(HeapVector<Member<Node>>&);
468 void computeScaleAndScrollForFocusedNode(Node* focusedNode, bool zoomInToLeg ibleScale, float& scale, IntPoint& scroll, bool& needAnimation); 468 void computeScaleAndScrollForFocusedNode(Node* focusedNode, bool zoomInToLeg ibleScale, float& scale, IntPoint& scroll, bool& needAnimation);
469 469
470 void animateDoubleTapZoom(const IntPoint&); 470 void animateDoubleTapZoom(const IntPoint&);
471 471
472 void enableFakePageScaleAnimationForTesting(bool); 472 void enableFakePageScaleAnimationForTesting(bool);
473 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo mPending; } 473 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo mPending; }
474 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f akePageScaleAnimationTargetPosition; } 474 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f akePageScaleAnimationTargetPosition; }
475 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS caleAnimationPageScaleFactor; } 475 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS caleAnimationPageScaleFactor; }
476 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc aleAnimationUseAnchor; } 476 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc aleAnimationUseAnchor; }
477 477
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 void disablePopupMouseWheelEventListener(); 624 void disablePopupMouseWheelEventListener();
625 625
626 void cancelPagePopup(); 626 void cancelPagePopup();
627 void updatePageOverlays(); 627 void updatePageOverlays();
628 628
629 float deviceScaleFactor() const; 629 float deviceScaleFactor() const;
630 630
631 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) 631 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.)
632 WebSpellCheckClient* m_spellCheckClient; 632 WebSpellCheckClient* m_spellCheckClient;
633 633
634 OwnPtrWillBePersistent<ChromeClientImpl> m_chromeClientImpl; 634 Persistent<ChromeClientImpl> m_chromeClientImpl;
635 ContextMenuClientImpl m_contextMenuClientImpl; 635 ContextMenuClientImpl m_contextMenuClientImpl;
636 DragClientImpl m_dragClientImpl; 636 DragClientImpl m_dragClientImpl;
637 EditorClientImpl m_editorClientImpl; 637 EditorClientImpl m_editorClientImpl;
638 SpellCheckerClientImpl m_spellCheckerClientImpl; 638 SpellCheckerClientImpl m_spellCheckerClientImpl;
639 StorageClientImpl m_storageClientImpl; 639 StorageClientImpl m_storageClientImpl;
640 640
641 WebSize m_size; 641 WebSize m_size;
642 // If true, automatically resize the layout view around its content. 642 // If true, automatically resize the layout view around its content.
643 bool m_shouldAutoResize; 643 bool m_shouldAutoResize;
644 // The lower bound on the size when auto-resizing. 644 // The lower bound on the size when auto-resizing.
645 IntSize m_minAutoSize; 645 IntSize m_minAutoSize;
646 // The upper bound on the size when auto-resizing. 646 // The upper bound on the size when auto-resizing.
647 IntSize m_maxAutoSize; 647 IntSize m_maxAutoSize;
648 648
649 OwnPtrWillBePersistent<Page> m_page; 649 Persistent<Page> m_page;
650 650
651 // An object that can be used to manipulate m_page->settings() without linki ng 651 // An object that can be used to manipulate m_page->settings() without linki ng
652 // against WebCore. This is lazily allocated the first time GetWebSettings() 652 // against WebCore. This is lazily allocated the first time GetWebSettings()
653 // is called. 653 // is called.
654 OwnPtr<WebSettingsImpl> m_webSettings; 654 OwnPtr<WebSettingsImpl> m_webSettings;
655 655
656 // A copy of the web drop data object we received from the browser. 656 // A copy of the web drop data object we received from the browser.
657 Persistent<DataObject> m_currentDragData; 657 Persistent<DataObject> m_currentDragData;
658 658
659 // The point relative to the client area where the mouse was last pressed 659 // The point relative to the client area where the mouse was last pressed
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 WebDragOperation m_operationsAllowed; 712 WebDragOperation m_operationsAllowed;
713 713
714 // The current drag operation as negotiated by the source and destination. 714 // The current drag operation as negotiated by the source and destination.
715 // When not equal to DragOperationNone, the drag data can be dropped onto th e 715 // When not equal to DragOperationNone, the drag data can be dropped onto th e
716 // current drop target in this WebView (the drop target can accept the drop) . 716 // current drop target in this WebView (the drop target can accept the drop) .
717 WebDragOperation m_dragOperation; 717 WebDragOperation m_dragOperation;
718 718
719 // The popup associated with an input/select element. 719 // The popup associated with an input/select element.
720 RefPtr<WebPagePopupImpl> m_pagePopup; 720 RefPtr<WebPagePopupImpl> m_pagePopup;
721 721
722 OwnPtrWillBePersistent<DevToolsEmulator> m_devToolsEmulator; 722 Persistent<DevToolsEmulator> m_devToolsEmulator;
723 OwnPtr<PageOverlay> m_pageColorOverlay; 723 OwnPtr<PageOverlay> m_pageColorOverlay;
724 724
725 // Whether the webview is rendering transparently. 725 // Whether the webview is rendering transparently.
726 bool m_isTransparent; 726 bool m_isTransparent;
727 727
728 // Whether the user can press tab to focus links. 728 // Whether the user can press tab to focus links.
729 bool m_tabsToLinks; 729 bool m_tabsToLinks;
730 730
731 // If set, the (plugin) node which has mouse capture. 731 // If set, the (plugin) node which has mouse capture.
732 RefPtrWillBePersistent<Node> m_mouseCaptureNode; 732 Persistent<Node> m_mouseCaptureNode;
733 RefPtr<UserGestureToken> m_mouseCaptureGestureToken; 733 RefPtr<UserGestureToken> m_mouseCaptureGestureToken;
734 734
735 RefPtr<UserGestureToken> m_pointerLockGestureToken; 735 RefPtr<UserGestureToken> m_pointerLockGestureToken;
736 736
737 WebLayerTreeView* m_layerTreeView; 737 WebLayerTreeView* m_layerTreeView;
738 WebLayer* m_rootLayer; 738 WebLayer* m_rootLayer;
739 GraphicsLayer* m_rootGraphicsLayer; 739 GraphicsLayer* m_rootGraphicsLayer;
740 OwnPtr<GraphicsLayerFactory> m_graphicsLayerFactory; 740 OwnPtr<GraphicsLayerFactory> m_graphicsLayerFactory;
741 bool m_matchesHeuristicsForGpuRasterization; 741 bool m_matchesHeuristicsForGpuRasterization;
742 static const WebInputEvent* m_currentInputEvent; 742 static const WebInputEvent* m_currentInputEvent;
743 743
744 MediaKeysClientImpl m_mediaKeysClientImpl; 744 MediaKeysClientImpl m_mediaKeysClientImpl;
745 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; 745 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation;
746 WebPoint m_positionOnFlingStart; 746 WebPoint m_positionOnFlingStart;
747 WebPoint m_globalPositionOnFlingStart; 747 WebPoint m_globalPositionOnFlingStart;
748 int m_flingModifier; 748 int m_flingModifier;
749 WebGestureDevice m_flingSourceDevice; 749 WebGestureDevice m_flingSourceDevice;
750 Vector<OwnPtr<LinkHighlightImpl>> m_linkHighlights; 750 Vector<OwnPtr<LinkHighlightImpl>> m_linkHighlights;
751 OwnPtr<WebCompositorAnimationTimeline> m_linkHighlightsTimeline; 751 OwnPtr<WebCompositorAnimationTimeline> m_linkHighlightsTimeline;
752 OwnPtrWillBePersistent<FullscreenController> m_fullscreenController; 752 Persistent<FullscreenController> m_fullscreenController;
753 753
754 bool m_showFPSCounter; 754 bool m_showFPSCounter;
755 WebColor m_baseBackgroundColor; 755 WebColor m_baseBackgroundColor;
756 WebColor m_backgroundColorOverride; 756 WebColor m_backgroundColorOverride;
757 float m_zoomFactorOverride; 757 float m_zoomFactorOverride;
758 758
759 bool m_userGestureObserved; 759 bool m_userGestureObserved;
760 bool m_shouldDispatchFirstVisuallyNonEmptyLayout; 760 bool m_shouldDispatchFirstVisuallyNonEmptyLayout;
761 bool m_shouldDispatchFirstLayoutAfterFinishedParsing; 761 bool m_shouldDispatchFirstLayoutAfterFinishedParsing;
762 bool m_shouldDispatchFirstLayoutAfterFinishedLoading; 762 bool m_shouldDispatchFirstLayoutAfterFinishedLoading;
763 WebDisplayMode m_displayMode; 763 WebDisplayMode m_displayMode;
764 764
765 FloatSize m_elasticOverscroll; 765 FloatSize m_elasticOverscroll;
766 766
767 RefPtrWillBePersistent<EventListener> m_popupMouseWheelEventListener; 767 Persistent<EventListener> m_popupMouseWheelEventListener;
768 768
769 WebPageImportanceSignals m_pageImportanceSignals; 769 WebPageImportanceSignals m_pageImportanceSignals;
770 770
771 const OwnPtr<WebViewScheduler> m_scheduler; 771 const OwnPtr<WebViewScheduler> m_scheduler;
772 772
773 // Manages the layer tree created for this page in Slimming Paint v2. 773 // Manages the layer tree created for this page in Slimming Paint v2.
774 PaintArtifactCompositor m_paintArtifactCompositor; 774 PaintArtifactCompositor m_paintArtifactCompositor;
775 }; 775 };
776 776
777 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView()); 777 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView());
778 // We have no ways to check if the specified WebView is an instance of 778 // We have no ways to check if the specified WebView is an instance of
779 // WebViewImpl because WebViewImpl is the only implementation of WebView. 779 // WebViewImpl because WebViewImpl is the only implementation of WebView.
780 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 780 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
781 781
782 } // namespace blink 782 } // namespace blink
783 783
784 #endif 784 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698