OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file.#ifndef WebViewBase_h | 3 // found in the LICENSE file.#ifndef WebViewBase_h |
4 | 4 |
5 #ifndef WebViewBase_h | 5 #ifndef WebViewBase_h |
6 #define WebViewBase_h | 6 #define WebViewBase_h |
7 | 7 |
8 #include "core/page/EventWithHitTestResults.h" | 8 #include "core/page/EventWithHitTestResults.h" |
9 #include "platform/transforms/TransformationMatrix.h" | 9 #include "platform/transforms/TransformationMatrix.h" |
10 #include "platform/wtf/RefCounted.h" | 10 #include "platform/wtf/RefCounted.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 class PagePopup; | 32 class PagePopup; |
33 class PagePopupClient; | 33 class PagePopupClient; |
34 class PageScaleConstraintsSet; | 34 class PageScaleConstraintsSet; |
35 class WebInputEvent; | 35 class WebInputEvent; |
36 class WebInputMethodControllerImpl; | 36 class WebInputMethodControllerImpl; |
37 class WebKeyboardEvent; | 37 class WebKeyboardEvent; |
38 class WebLayer; | 38 class WebLayer; |
39 class WebLocalFrameImpl; | 39 class WebLocalFrameImpl; |
40 class WebLayerTreeView; | 40 class WebLayerTreeView; |
41 class WebPagePopupImpl; | 41 class WebPagePopupImpl; |
| 42 struct WebScrollBoundaryBehavior; |
42 class WebSettingsImpl; | 43 class WebSettingsImpl; |
43 struct WebRect; | 44 struct WebRect; |
44 | 45 |
45 // WebViewBase is a temporary class introduced to decouple the defintion of | 46 // WebViewBase is a temporary class introduced to decouple the defintion of |
46 // WebViewImpl from the concrete implementation. It was not possible to move the | 47 // WebViewImpl from the concrete implementation. It was not possible to move the |
47 // defintion of these methods to WebView as we did not want to pollute the | 48 // defintion of these methods to WebView as we did not want to pollute the |
48 // public API surface area. | 49 // public API surface area. |
49 // | 50 // |
50 // Once WebViewImpl is moved from web to core/exported then this class should be | 51 // Once WebViewImpl is moved from web to core/exported then this class should be |
51 // removed and clients can once again depend on WebViewImpl. | 52 // removed and clients can once again depend on WebViewImpl. |
52 class WebViewBase : public WebView, public RefCounted<WebViewBase> { | 53 class WebViewBase : public WebView, public RefCounted<WebViewBase> { |
53 public: | 54 public: |
54 virtual ~WebViewBase() {} | 55 virtual ~WebViewBase() {} |
55 | 56 |
56 virtual void SetBaseBackgroundColor(WebColor) = 0; | 57 virtual void SetBaseBackgroundColor(WebColor) = 0; |
57 virtual void SetBaseBackgroundColorOverride(WebColor) = 0; | 58 virtual void SetBaseBackgroundColorOverride(WebColor) = 0; |
58 virtual void ClearBaseBackgroundColorOverride() = 0; | 59 virtual void ClearBaseBackgroundColorOverride() = 0; |
59 virtual void SetBackgroundColorOverride(WebColor) = 0; | 60 virtual void SetBackgroundColorOverride(WebColor) = 0; |
60 virtual void ClearBackgroundColorOverride() = 0; | 61 virtual void ClearBackgroundColorOverride() = 0; |
61 virtual void SetZoomFactorOverride(float) = 0; | 62 virtual void SetZoomFactorOverride(float) = 0; |
62 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0; | 63 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0; |
63 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0; | 64 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0; |
64 virtual void SetShowDebugBorders(bool) = 0; | 65 virtual void SetShowDebugBorders(bool) = 0; |
| 66 virtual void SetScrollBoundaryBehavior(WebScrollBoundaryBehavior) const = 0; |
65 | 67 |
66 virtual Page* GetPage() const = 0; | 68 virtual Page* GetPage() const = 0; |
67 virtual Frame* FocusedCoreFrame() const = 0; | 69 virtual Frame* FocusedCoreFrame() const = 0; |
68 | 70 |
69 static WebViewBase* FromPage(Page*); | 71 static WebViewBase* FromPage(Page*); |
70 static HashSet<WebViewBase*>& AllInstances(); | 72 static HashSet<WebViewBase*>& AllInstances(); |
71 | 73 |
72 // Returns the main frame associated with this view. This may be null when | 74 // Returns the main frame associated with this view. This may be null when |
73 // the page is shutting down, but will be valid at all other times. | 75 // the page is shutting down, but will be valid at all other times. |
74 virtual WebLocalFrameImpl* MainFrameImpl() const = 0; | 76 virtual WebLocalFrameImpl* MainFrameImpl() const = 0; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 virtual void EnableTapHighlightAtPoint( | 218 virtual void EnableTapHighlightAtPoint( |
217 const GestureEventWithHitTestResults& targeted_tap_event) = 0; | 219 const GestureEventWithHitTestResults& targeted_tap_event) = 0; |
218 virtual LinkHighlightImpl* GetLinkHighlight(int) = 0; | 220 virtual LinkHighlightImpl* GetLinkHighlight(int) = 0; |
219 virtual unsigned NumLinkHighlights() = 0; | 221 virtual unsigned NumLinkHighlights() = 0; |
220 virtual void EnableTapHighlights(HeapVector<Member<Node>>&) = 0; | 222 virtual void EnableTapHighlights(HeapVector<Member<Node>>&) = 0; |
221 virtual void SetCurrentInputEventForTest(const WebInputEvent*) = 0; | 223 virtual void SetCurrentInputEventForTest(const WebInputEvent*) = 0; |
222 }; | 224 }; |
223 } | 225 } |
224 | 226 |
225 #endif | 227 #endif |
OLD | NEW |