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 17 matching lines...) Expand all Loading... | |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebViewImpl_h | 31 #ifndef WebViewImpl_h |
32 #define WebViewImpl_h | 32 #define WebViewImpl_h |
33 | 33 |
34 #include "core/page/PagePopupDriver.h" | 34 #include "core/page/PagePopupDriver.h" |
35 #include "platform/geometry/IntPoint.h" | 35 #include "platform/geometry/IntPoint.h" |
36 #include "platform/geometry/IntRect.h" | 36 #include "platform/geometry/IntRect.h" |
37 #include "platform/graphics/GraphicsLayer.h" | 37 #include "platform/graphics/GraphicsLayer.h" |
38 #include "platform/heap/Handle.h" | |
38 #include "public/platform/WebGestureCurveTarget.h" | 39 #include "public/platform/WebGestureCurveTarget.h" |
39 #include "public/platform/WebLayer.h" | 40 #include "public/platform/WebLayer.h" |
40 #include "public/platform/WebPoint.h" | 41 #include "public/platform/WebPoint.h" |
41 #include "public/platform/WebRect.h" | 42 #include "public/platform/WebRect.h" |
42 #include "public/platform/WebSize.h" | 43 #include "public/platform/WebSize.h" |
43 #include "public/platform/WebString.h" | 44 #include "public/platform/WebString.h" |
44 #include "public/web/WebInputEvent.h" | 45 #include "public/web/WebInputEvent.h" |
45 #include "public/web/WebNavigationPolicy.h" | 46 #include "public/web/WebNavigationPolicy.h" |
46 #include "public/web/WebView.h" | 47 #include "public/web/WebView.h" |
47 #include "web/BackForwardClientImpl.h" | 48 #include "web/BackForwardClientImpl.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
65 class DataObject; | 66 class DataObject; |
66 class Frame; | 67 class Frame; |
67 class FullscreenController; | 68 class FullscreenController; |
68 class LinkHighlight; | 69 class LinkHighlight; |
69 class PopupContainer; | 70 class PopupContainer; |
70 class RenderLayerCompositor; | 71 class RenderLayerCompositor; |
71 class UserGestureToken; | 72 class UserGestureToken; |
72 class WebActiveGestureAnimation; | 73 class WebActiveGestureAnimation; |
73 class WebDevToolsAgentPrivate; | 74 class WebDevToolsAgentPrivate; |
74 class WebLocalFrameImpl; | 75 class WebLocalFrameImpl; |
76 class WebRemoteFrameImpl; | |
75 class WebImage; | 77 class WebImage; |
76 class WebPagePopupImpl; | 78 class WebPagePopupImpl; |
77 class WebPlugin; | 79 class WebPlugin; |
78 class WebSettingsImpl; | 80 class WebSettingsImpl; |
79 | 81 |
80 class WebViewImpl FINAL : public WebView | 82 class WebViewImpl FINAL : public WebView |
81 , public RefCounted<WebViewImpl> | 83 , public RefCounted<WebViewImpl> |
82 , public WebGestureCurveTarget | 84 , public WebGestureCurveTarget |
83 , public PagePopupDriver | 85 , public PagePopupDriver |
84 , public PageWidgetEventHandler { | 86 , public PageWidgetEventHandler { |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
594 bool m_fixedLayoutSizeLock; | 596 bool m_fixedLayoutSizeLock; |
595 // If true, automatically resize the render view around its content. | 597 // If true, automatically resize the render view around its content. |
596 bool m_shouldAutoResize; | 598 bool m_shouldAutoResize; |
597 // The lower bound on the size when auto-resizing. | 599 // The lower bound on the size when auto-resizing. |
598 IntSize m_minAutoSize; | 600 IntSize m_minAutoSize; |
599 // The upper bound on the size when auto-resizing. | 601 // The upper bound on the size when auto-resizing. |
600 IntSize m_maxAutoSize; | 602 IntSize m_maxAutoSize; |
601 | 603 |
602 OwnPtrWillBePersistent<Page> m_page; | 604 OwnPtrWillBePersistent<Page> m_page; |
603 | 605 |
606 #if ENABLE(OILPAN) | |
607 // With Oilpan, the WebViewImpl object keeps a strong reference to one kind of main | |
608 // frame, so as to keep it alive until the view lets it go. | |
609 // | |
610 // In the non-Oilpan case, the ref-counted frame is instead created and retu rned with | |
611 // a ref count that must be balanced by eventually calling close() on the | |
612 // Web*FrameImpl object. That close() call is also assumed for Oilpan, but w e need | |
613 // to keep the object alive until that time. Hence these mutually-exclusive Persistent<>s. | |
614 Persistent<WebLocalFrameImpl> m_localMainFrame; | |
615 Persistent<WebRemoteFrameImpl> m_remoteMainFrame; | |
dcheng
2014/09/11 17:03:10
Page also has a main frame field. It feels redunda
sof
2014/09/12 10:06:21
This is about retaining the Web{Local,Remote}Frame
| |
616 #endif | |
617 | |
604 // An object that can be used to manipulate m_page->settings() without linki ng | 618 // An object that can be used to manipulate m_page->settings() without linki ng |
605 // against WebCore. This is lazily allocated the first time GetWebSettings() | 619 // against WebCore. This is lazily allocated the first time GetWebSettings() |
606 // is called. | 620 // is called. |
607 OwnPtr<WebSettingsImpl> m_webSettings; | 621 OwnPtr<WebSettingsImpl> m_webSettings; |
608 | 622 |
609 // A copy of the web drop data object we received from the browser. | 623 // A copy of the web drop data object we received from the browser. |
610 RefPtrWillBePersistent<DataObject> m_currentDragData; | 624 RefPtrWillBePersistent<DataObject> m_currentDragData; |
611 | 625 |
612 // The point relative to the client area where the mouse was last pressed | 626 // The point relative to the client area where the mouse was last pressed |
613 // down. This is used by the drag client to determine what was under the | 627 // down. This is used by the drag client to determine what was under the |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
701 bool m_recreatingGraphicsContext; | 715 bool m_recreatingGraphicsContext; |
702 static const WebInputEvent* m_currentInputEvent; | 716 static const WebInputEvent* m_currentInputEvent; |
703 | 717 |
704 MediaKeysClientImpl m_mediaKeysClientImpl; | 718 MediaKeysClientImpl m_mediaKeysClientImpl; |
705 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; | 719 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; |
706 WebPoint m_positionOnFlingStart; | 720 WebPoint m_positionOnFlingStart; |
707 WebPoint m_globalPositionOnFlingStart; | 721 WebPoint m_globalPositionOnFlingStart; |
708 int m_flingModifier; | 722 int m_flingModifier; |
709 bool m_flingSourceDevice; | 723 bool m_flingSourceDevice; |
710 Vector<OwnPtr<LinkHighlight> > m_linkHighlights; | 724 Vector<OwnPtr<LinkHighlight> > m_linkHighlights; |
711 OwnPtr<FullscreenController> m_fullscreenController; | 725 OwnPtrWillBePersistent<FullscreenController> m_fullscreenController; |
712 | 726 |
713 bool m_showFPSCounter; | 727 bool m_showFPSCounter; |
714 bool m_showPaintRects; | 728 bool m_showPaintRects; |
715 bool m_showDebugBorders; | 729 bool m_showDebugBorders; |
716 bool m_continuousPaintingEnabled; | 730 bool m_continuousPaintingEnabled; |
717 bool m_showScrollBottleneckRects; | 731 bool m_showScrollBottleneckRects; |
718 WebColor m_baseBackgroundColor; | 732 WebColor m_baseBackgroundColor; |
719 WebColor m_backgroundColorOverride; | 733 WebColor m_backgroundColorOverride; |
720 float m_zoomFactorOverride; | 734 float m_zoomFactorOverride; |
721 | 735 |
722 bool m_userGestureObserved; | 736 bool m_userGestureObserved; |
723 float m_topControlsContentOffset; | 737 float m_topControlsContentOffset; |
724 }; | 738 }; |
725 | 739 |
726 // We have no ways to check if the specified WebView is an instance of | 740 // We have no ways to check if the specified WebView is an instance of |
727 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 741 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
728 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 742 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
729 | 743 |
730 } // namespace blink | 744 } // namespace blink |
731 | 745 |
732 #endif | 746 #endif |
OLD | NEW |