| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "web/ChromeClientImpl.h" | 56 #include "web/ChromeClientImpl.h" |
| 57 #include "web/ContextMenuClientImpl.h" | 57 #include "web/ContextMenuClientImpl.h" |
| 58 #include "web/EditorClientImpl.h" | 58 #include "web/EditorClientImpl.h" |
| 59 #include "web/MediaKeysClientImpl.h" | 59 #include "web/MediaKeysClientImpl.h" |
| 60 #include "web/PageWidgetDelegate.h" | 60 #include "web/PageWidgetDelegate.h" |
| 61 #include "web/SpellCheckerClientImpl.h" | 61 #include "web/SpellCheckerClientImpl.h" |
| 62 #include "web/StorageClientImpl.h" | 62 #include "web/StorageClientImpl.h" |
| 63 #include "web/WebExport.h" | 63 #include "web/WebExport.h" |
| 64 #include "wtf/Compiler.h" | 64 #include "wtf/Compiler.h" |
| 65 #include "wtf/HashSet.h" | 65 #include "wtf/HashSet.h" |
| 66 #include "wtf/OwnPtr.h" | |
| 67 #include "wtf/RefCounted.h" | 66 #include "wtf/RefCounted.h" |
| 68 #include "wtf/Vector.h" | 67 #include "wtf/Vector.h" |
| 68 #include <memory> |
| 69 | 69 |
| 70 namespace blink { | 70 namespace blink { |
| 71 | 71 |
| 72 class DataObject; | 72 class DataObject; |
| 73 class DevToolsEmulator; | 73 class DevToolsEmulator; |
| 74 class Frame; | 74 class Frame; |
| 75 class FullscreenController; | 75 class FullscreenController; |
| 76 class InspectorOverlay; | 76 class InspectorOverlay; |
| 77 class LinkHighlightImpl; | 77 class LinkHighlightImpl; |
| 78 class PageOverlay; | 78 class PageOverlay; |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 // The lower bound on the size when auto-resizing. | 634 // The lower bound on the size when auto-resizing. |
| 635 IntSize m_minAutoSize; | 635 IntSize m_minAutoSize; |
| 636 // The upper bound on the size when auto-resizing. | 636 // The upper bound on the size when auto-resizing. |
| 637 IntSize m_maxAutoSize; | 637 IntSize m_maxAutoSize; |
| 638 | 638 |
| 639 Persistent<Page> m_page; | 639 Persistent<Page> m_page; |
| 640 | 640 |
| 641 // An object that can be used to manipulate m_page->settings() without linki
ng | 641 // An object that can be used to manipulate m_page->settings() without linki
ng |
| 642 // against WebCore. This is lazily allocated the first time GetWebSettings() | 642 // against WebCore. This is lazily allocated the first time GetWebSettings() |
| 643 // is called. | 643 // is called. |
| 644 OwnPtr<WebSettingsImpl> m_webSettings; | 644 std::unique_ptr<WebSettingsImpl> m_webSettings; |
| 645 | 645 |
| 646 // A copy of the web drop data object we received from the browser. | 646 // A copy of the web drop data object we received from the browser. |
| 647 Persistent<DataObject> m_currentDragData; | 647 Persistent<DataObject> m_currentDragData; |
| 648 | 648 |
| 649 // Keeps track of the current zoom level. 0 means no zoom, positive numbers | 649 // Keeps track of the current zoom level. 0 means no zoom, positive numbers |
| 650 // mean zoom in, negative numbers mean zoom out. | 650 // mean zoom in, negative numbers mean zoom out. |
| 651 double m_zoomLevel; | 651 double m_zoomLevel; |
| 652 | 652 |
| 653 double m_minimumZoomLevel; | 653 double m_minimumZoomLevel; |
| 654 | 654 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 | 694 |
| 695 // The current drag operation as negotiated by the source and destination. | 695 // The current drag operation as negotiated by the source and destination. |
| 696 // When not equal to DragOperationNone, the drag data can be dropped onto th
e | 696 // When not equal to DragOperationNone, the drag data can be dropped onto th
e |
| 697 // current drop target in this WebView (the drop target can accept the drop)
. | 697 // current drop target in this WebView (the drop target can accept the drop)
. |
| 698 WebDragOperation m_dragOperation; | 698 WebDragOperation m_dragOperation; |
| 699 | 699 |
| 700 // The popup associated with an input/select element. | 700 // The popup associated with an input/select element. |
| 701 RefPtr<WebPagePopupImpl> m_pagePopup; | 701 RefPtr<WebPagePopupImpl> m_pagePopup; |
| 702 | 702 |
| 703 Persistent<DevToolsEmulator> m_devToolsEmulator; | 703 Persistent<DevToolsEmulator> m_devToolsEmulator; |
| 704 OwnPtr<PageOverlay> m_pageColorOverlay; | 704 std::unique_ptr<PageOverlay> m_pageColorOverlay; |
| 705 | 705 |
| 706 // Whether the webview is rendering transparently. | 706 // Whether the webview is rendering transparently. |
| 707 bool m_isTransparent; | 707 bool m_isTransparent; |
| 708 | 708 |
| 709 // Whether the user can press tab to focus links. | 709 // Whether the user can press tab to focus links. |
| 710 bool m_tabsToLinks; | 710 bool m_tabsToLinks; |
| 711 | 711 |
| 712 // If set, the (plugin) node which has mouse capture. | 712 // If set, the (plugin) node which has mouse capture. |
| 713 Persistent<Node> m_mouseCaptureNode; | 713 Persistent<Node> m_mouseCaptureNode; |
| 714 RefPtr<UserGestureToken> m_mouseCaptureGestureToken; | 714 RefPtr<UserGestureToken> m_mouseCaptureGestureToken; |
| 715 | 715 |
| 716 RefPtr<UserGestureToken> m_pointerLockGestureToken; | 716 RefPtr<UserGestureToken> m_pointerLockGestureToken; |
| 717 | 717 |
| 718 WebLayerTreeView* m_layerTreeView; | 718 WebLayerTreeView* m_layerTreeView; |
| 719 WebLayer* m_rootLayer; | 719 WebLayer* m_rootLayer; |
| 720 GraphicsLayer* m_rootGraphicsLayer; | 720 GraphicsLayer* m_rootGraphicsLayer; |
| 721 GraphicsLayer* m_visualViewportContainerLayer; | 721 GraphicsLayer* m_visualViewportContainerLayer; |
| 722 bool m_matchesHeuristicsForGpuRasterization; | 722 bool m_matchesHeuristicsForGpuRasterization; |
| 723 static const WebInputEvent* m_currentInputEvent; | 723 static const WebInputEvent* m_currentInputEvent; |
| 724 | 724 |
| 725 MediaKeysClientImpl m_mediaKeysClientImpl; | 725 MediaKeysClientImpl m_mediaKeysClientImpl; |
| 726 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; | 726 std::unique_ptr<WebActiveGestureAnimation> m_gestureAnimation; |
| 727 WebPoint m_positionOnFlingStart; | 727 WebPoint m_positionOnFlingStart; |
| 728 WebPoint m_globalPositionOnFlingStart; | 728 WebPoint m_globalPositionOnFlingStart; |
| 729 int m_flingModifier; | 729 int m_flingModifier; |
| 730 WebGestureDevice m_flingSourceDevice; | 730 WebGestureDevice m_flingSourceDevice; |
| 731 Vector<OwnPtr<LinkHighlightImpl>> m_linkHighlights; | 731 Vector<std::unique_ptr<LinkHighlightImpl>> m_linkHighlights; |
| 732 OwnPtr<CompositorAnimationTimeline> m_linkHighlightsTimeline; | 732 std::unique_ptr<CompositorAnimationTimeline> m_linkHighlightsTimeline; |
| 733 Persistent<FullscreenController> m_fullscreenController; | 733 Persistent<FullscreenController> m_fullscreenController; |
| 734 | 734 |
| 735 WebColor m_baseBackgroundColor; | 735 WebColor m_baseBackgroundColor; |
| 736 WebColor m_backgroundColorOverride; | 736 WebColor m_backgroundColorOverride; |
| 737 float m_zoomFactorOverride; | 737 float m_zoomFactorOverride; |
| 738 | 738 |
| 739 bool m_userGestureObserved; | 739 bool m_userGestureObserved; |
| 740 bool m_shouldDispatchFirstVisuallyNonEmptyLayout; | 740 bool m_shouldDispatchFirstVisuallyNonEmptyLayout; |
| 741 bool m_shouldDispatchFirstLayoutAfterFinishedParsing; | 741 bool m_shouldDispatchFirstLayoutAfterFinishedParsing; |
| 742 bool m_shouldDispatchFirstLayoutAfterFinishedLoading; | 742 bool m_shouldDispatchFirstLayoutAfterFinishedLoading; |
| 743 WebDisplayMode m_displayMode; | 743 WebDisplayMode m_displayMode; |
| 744 | 744 |
| 745 FloatSize m_elasticOverscroll; | 745 FloatSize m_elasticOverscroll; |
| 746 | 746 |
| 747 // This is owned by the LayerTreeHostImpl, and should only be used on the | 747 // This is owned by the LayerTreeHostImpl, and should only be used on the |
| 748 // compositor thread. The LayerTreeHostImpl is indirectly owned by this | 748 // compositor thread. The LayerTreeHostImpl is indirectly owned by this |
| 749 // class so this pointer should be valid until this class is destructed. | 749 // class so this pointer should be valid until this class is destructed. |
| 750 CrossThreadPersistent<CompositorMutatorImpl> m_mutator; | 750 CrossThreadPersistent<CompositorMutatorImpl> m_mutator; |
| 751 | 751 |
| 752 Persistent<EventListener> m_popupMouseWheelEventListener; | 752 Persistent<EventListener> m_popupMouseWheelEventListener; |
| 753 | 753 |
| 754 WebPageImportanceSignals m_pageImportanceSignals; | 754 WebPageImportanceSignals m_pageImportanceSignals; |
| 755 | 755 |
| 756 const OwnPtr<WebViewScheduler> m_scheduler; | 756 const std::unique_ptr<WebViewScheduler> m_scheduler; |
| 757 | 757 |
| 758 // Manages the layer tree created for this page in Slimming Paint v2. | 758 // Manages the layer tree created for this page in Slimming Paint v2. |
| 759 PaintArtifactCompositor m_paintArtifactCompositor; | 759 PaintArtifactCompositor m_paintArtifactCompositor; |
| 760 | 760 |
| 761 double m_lastFrameTimeMonotonic; | 761 double m_lastFrameTimeMonotonic; |
| 762 }; | 762 }; |
| 763 | 763 |
| 764 // We have no ways to check if the specified WebView is an instance of | 764 // We have no ways to check if the specified WebView is an instance of |
| 765 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 765 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 766 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 766 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 767 | 767 |
| 768 } // namespace blink | 768 } // namespace blink |
| 769 | 769 |
| 770 #endif | 770 #endif |
| OLD | NEW |