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/platform/WebVector.h" | 45 #include "public/platform/WebVector.h" |
45 #include "public/web/WebInputEvent.h" | 46 #include "public/web/WebInputEvent.h" |
46 #include "public/web/WebNavigationPolicy.h" | 47 #include "public/web/WebNavigationPolicy.h" |
47 #include "public/web/WebView.h" | 48 #include "public/web/WebView.h" |
(...skipping 18 matching lines...) Expand all Loading... |
66 class DataObject; | 67 class DataObject; |
67 class Frame; | 68 class Frame; |
68 class FullscreenController; | 69 class FullscreenController; |
69 class LinkHighlight; | 70 class LinkHighlight; |
70 class PopupContainer; | 71 class PopupContainer; |
71 class RenderLayerCompositor; | 72 class RenderLayerCompositor; |
72 class UserGestureToken; | 73 class UserGestureToken; |
73 class WebActiveGestureAnimation; | 74 class WebActiveGestureAnimation; |
74 class WebDevToolsAgentPrivate; | 75 class WebDevToolsAgentPrivate; |
75 class WebLocalFrameImpl; | 76 class WebLocalFrameImpl; |
| 77 class WebRemoteFrameImpl; |
76 class WebImage; | 78 class WebImage; |
77 class WebPagePopupImpl; | 79 class WebPagePopupImpl; |
78 class WebPlugin; | 80 class WebPlugin; |
79 class WebSettingsImpl; | 81 class WebSettingsImpl; |
80 | 82 |
81 class WebViewImpl FINAL : public WebView | 83 class WebViewImpl FINAL : public WebView |
82 , public RefCounted<WebViewImpl> | 84 , public RefCounted<WebViewImpl> |
83 , public WebGestureCurveTarget | 85 , public WebGestureCurveTarget |
84 , public PagePopupDriver | 86 , public PagePopupDriver |
85 , public PageWidgetEventHandler { | 87 , public PageWidgetEventHandler { |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 487 |
486 // Exposed for tests. | 488 // Exposed for tests. |
487 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 489 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
488 | 490 |
489 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 491 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
490 | 492 |
491 bool pinchVirtualViewportEnabled() const; | 493 bool pinchVirtualViewportEnabled() const; |
492 | 494 |
493 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } | 495 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } |
494 | 496 |
| 497 #if ENABLE(OILPAN) |
| 498 void clearMainFrame(WebLocalFrameImpl*); |
| 499 void clearMainFrame(WebRemoteFrameImpl*); |
| 500 #endif |
| 501 |
495 private: | 502 private: |
496 void setTopControlsContentOffset(float); | 503 void setTopControlsContentOffset(float); |
497 | 504 |
498 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to | 505 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to |
499 // prevent external usage | 506 // prevent external usage |
500 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; | 507 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; |
501 | 508 |
502 float legibleScale() const; | 509 float legibleScale() const; |
503 void refreshPageScaleFactorAfterLayout(); | 510 void refreshPageScaleFactorAfterLayout(); |
504 void resumeTreeViewCommits(); | 511 void resumeTreeViewCommits(); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 bool m_fixedLayoutSizeLock; | 605 bool m_fixedLayoutSizeLock; |
599 // If true, automatically resize the render view around its content. | 606 // If true, automatically resize the render view around its content. |
600 bool m_shouldAutoResize; | 607 bool m_shouldAutoResize; |
601 // The lower bound on the size when auto-resizing. | 608 // The lower bound on the size when auto-resizing. |
602 IntSize m_minAutoSize; | 609 IntSize m_minAutoSize; |
603 // The upper bound on the size when auto-resizing. | 610 // The upper bound on the size when auto-resizing. |
604 IntSize m_maxAutoSize; | 611 IntSize m_maxAutoSize; |
605 | 612 |
606 OwnPtrWillBePersistent<Page> m_page; | 613 OwnPtrWillBePersistent<Page> m_page; |
607 | 614 |
| 615 #if ENABLE(OILPAN) |
| 616 // With Oilpan, the WebViewImpl object keeps a strong reference to one kind
of main |
| 617 // frame, so as to keep it alive until the view lets it go. |
| 618 // |
| 619 // In the non-Oilpan case, the ref-counted frame is instead created and retu
rned with |
| 620 // a ref count that must be balanced by eventually calling close() on the |
| 621 // Web*FrameImpl object. That close() call is also assumed for Oilpan, but w
e need |
| 622 // to keep the object alive until that time. Hence these mutually-exclusive
Persistent<>s. |
| 623 Persistent<WebLocalFrameImpl> m_localMainFrame; |
| 624 Persistent<WebRemoteFrameImpl> m_remoteMainFrame; |
| 625 #endif |
| 626 |
608 // An object that can be used to manipulate m_page->settings() without linki
ng | 627 // An object that can be used to manipulate m_page->settings() without linki
ng |
609 // against WebCore. This is lazily allocated the first time GetWebSettings() | 628 // against WebCore. This is lazily allocated the first time GetWebSettings() |
610 // is called. | 629 // is called. |
611 OwnPtr<WebSettingsImpl> m_webSettings; | 630 OwnPtr<WebSettingsImpl> m_webSettings; |
612 | 631 |
613 // A copy of the web drop data object we received from the browser. | 632 // A copy of the web drop data object we received from the browser. |
614 RefPtrWillBePersistent<DataObject> m_currentDragData; | 633 RefPtrWillBePersistent<DataObject> m_currentDragData; |
615 | 634 |
616 // The point relative to the client area where the mouse was last pressed | 635 // The point relative to the client area where the mouse was last pressed |
617 // down. This is used by the drag client to determine what was under the | 636 // 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... |
705 bool m_recreatingGraphicsContext; | 724 bool m_recreatingGraphicsContext; |
706 static const WebInputEvent* m_currentInputEvent; | 725 static const WebInputEvent* m_currentInputEvent; |
707 | 726 |
708 MediaKeysClientImpl m_mediaKeysClientImpl; | 727 MediaKeysClientImpl m_mediaKeysClientImpl; |
709 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; | 728 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; |
710 WebPoint m_positionOnFlingStart; | 729 WebPoint m_positionOnFlingStart; |
711 WebPoint m_globalPositionOnFlingStart; | 730 WebPoint m_globalPositionOnFlingStart; |
712 int m_flingModifier; | 731 int m_flingModifier; |
713 bool m_flingSourceDevice; | 732 bool m_flingSourceDevice; |
714 Vector<OwnPtr<LinkHighlight> > m_linkHighlights; | 733 Vector<OwnPtr<LinkHighlight> > m_linkHighlights; |
715 OwnPtr<FullscreenController> m_fullscreenController; | 734 OwnPtrWillBePersistent<FullscreenController> m_fullscreenController; |
716 | 735 |
717 bool m_showFPSCounter; | 736 bool m_showFPSCounter; |
718 bool m_showPaintRects; | 737 bool m_showPaintRects; |
719 bool m_showDebugBorders; | 738 bool m_showDebugBorders; |
720 bool m_continuousPaintingEnabled; | 739 bool m_continuousPaintingEnabled; |
721 bool m_showScrollBottleneckRects; | 740 bool m_showScrollBottleneckRects; |
722 WebColor m_baseBackgroundColor; | 741 WebColor m_baseBackgroundColor; |
723 WebColor m_backgroundColorOverride; | 742 WebColor m_backgroundColorOverride; |
724 float m_zoomFactorOverride; | 743 float m_zoomFactorOverride; |
725 | 744 |
726 bool m_userGestureObserved; | 745 bool m_userGestureObserved; |
727 float m_topControlsContentOffset; | 746 float m_topControlsContentOffset; |
728 }; | 747 }; |
729 | 748 |
730 // We have no ways to check if the specified WebView is an instance of | 749 // We have no ways to check if the specified WebView is an instance of |
731 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 750 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
732 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 751 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
733 | 752 |
734 } // namespace blink | 753 } // namespace blink |
735 | 754 |
736 #endif | 755 #endif |
OLD | NEW |