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/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/page/EventWithHitTestResults.h" | 9 #include "core/page/EventWithHitTestResults.h" |
10 #include "platform/graphics/paint/PaintImage.h" | 10 #include "platform/graphics/paint/PaintImage.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 class PagePopup; | 33 class PagePopup; |
34 class PagePopupClient; | 34 class PagePopupClient; |
35 class PageScaleConstraintsSet; | 35 class PageScaleConstraintsSet; |
36 class WebInputEvent; | 36 class WebInputEvent; |
37 class WebInputMethodController; | 37 class WebInputMethodController; |
38 class WebKeyboardEvent; | 38 class WebKeyboardEvent; |
39 class WebLayer; | 39 class WebLayer; |
40 class WebLocalFrameBase; | 40 class WebLocalFrameBase; |
41 class WebLayerTreeView; | 41 class WebLayerTreeView; |
42 class WebPagePopupImpl; | 42 class WebPagePopupImpl; |
| 43 struct WebScrollBoundaryBehavior; |
43 class WebSettingsImpl; | 44 class WebSettingsImpl; |
44 struct WebRect; | 45 struct WebRect; |
45 | 46 |
46 // WebViewBase is a temporary class introduced to decouple the defintion of | 47 // WebViewBase is a temporary class introduced to decouple the defintion of |
47 // WebViewImpl from the concrete implementation. It was not possible to move the | 48 // WebViewImpl from the concrete implementation. It was not possible to move the |
48 // defintion of these methods to WebView as we did not want to pollute the | 49 // defintion of these methods to WebView as we did not want to pollute the |
49 // public API surface area. | 50 // public API surface area. |
50 // | 51 // |
51 // Once WebViewImpl is moved from web to core/exported then this class should be | 52 // Once WebViewImpl is moved from web to core/exported then this class should be |
52 // removed and clients can once again depend on WebViewImpl. | 53 // removed and clients can once again depend on WebViewImpl. |
53 class WebViewBase : public WebView, public RefCounted<WebViewBase> { | 54 class WebViewBase : public WebView, public RefCounted<WebViewBase> { |
54 public: | 55 public: |
55 virtual ~WebViewBase() {} | 56 virtual ~WebViewBase() {} |
56 | 57 |
57 virtual void SetBaseBackgroundColor(WebColor) = 0; | 58 virtual void SetBaseBackgroundColor(WebColor) = 0; |
58 virtual void SetBaseBackgroundColorOverride(WebColor) = 0; | 59 virtual void SetBaseBackgroundColorOverride(WebColor) = 0; |
59 virtual void ClearBaseBackgroundColorOverride() = 0; | 60 virtual void ClearBaseBackgroundColorOverride() = 0; |
60 virtual void SetBackgroundColorOverride(WebColor) = 0; | 61 virtual void SetBackgroundColorOverride(WebColor) = 0; |
61 virtual void ClearBackgroundColorOverride() = 0; | 62 virtual void ClearBackgroundColorOverride() = 0; |
62 virtual void SetZoomFactorOverride(float) = 0; | 63 virtual void SetZoomFactorOverride(float) = 0; |
63 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0; | 64 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0; |
64 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0; | 65 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0; |
65 virtual void SetShowDebugBorders(bool) = 0; | 66 virtual void SetShowDebugBorders(bool) = 0; |
| 67 virtual void SetScrollBoundaryBehavior(const WebScrollBoundaryBehavior&) = 0; |
66 | 68 |
67 virtual Page* GetPage() const = 0; | 69 virtual Page* GetPage() const = 0; |
68 virtual Frame* FocusedCoreFrame() const = 0; | 70 virtual Frame* FocusedCoreFrame() const = 0; |
69 | 71 |
70 CORE_EXPORT static HashSet<WebViewBase*>& AllInstances(); | 72 CORE_EXPORT 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 WebLocalFrameBase* MainFrameImpl() const = 0; | 76 virtual WebLocalFrameBase* MainFrameImpl() const = 0; |
75 | 77 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 virtual LinkHighlightImpl* GetLinkHighlight(int) = 0; | 225 virtual LinkHighlightImpl* GetLinkHighlight(int) = 0; |
224 virtual unsigned NumLinkHighlights() = 0; | 226 virtual unsigned NumLinkHighlights() = 0; |
225 virtual void EnableTapHighlights(HeapVector<Member<Node>>&) = 0; | 227 virtual void EnableTapHighlights(HeapVector<Member<Node>>&) = 0; |
226 | 228 |
227 protected: | 229 protected: |
228 CORE_EXPORT static const WebInputEvent* current_input_event_; | 230 CORE_EXPORT static const WebInputEvent* current_input_event_; |
229 }; | 231 }; |
230 } | 232 } |
231 | 233 |
232 #endif // WebViewBase_h | 234 #endif // WebViewBase_h |
OLD | NEW |