Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: third_party/WebKit/Source/core/exported/WebViewBase.h

Issue 2851993002: Move more methods from WebViewImpl to WebViewBase, and cut dependencies. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/ChromeClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "platform/transforms/TransformationMatrix.h" 8 #include "platform/transforms/TransformationMatrix.h"
9 #include "public/platform/WebDisplayMode.h" 9 #include "public/platform/WebDisplayMode.h"
10 #include "public/platform/WebInputEventResult.h" 10 #include "public/platform/WebInputEventResult.h"
11 #include "public/web/WebElement.h" 11 #include "public/web/WebElement.h"
12 #include "public/web/WebView.h" 12 #include "public/web/WebView.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CompositorAnimationTimeline; 16 class CompositorAnimationTimeline;
17 class ContextMenuProvider; 17 class ContextMenuProvider;
18 class DevToolsEmulator; 18 class DevToolsEmulator;
19 class Frame; 19 class Frame;
20 class GraphicsLayer;
20 class Page; 21 class Page;
22 class PaintLayerCompositor;
23 class PagePopup;
24 class PagePopupClient;
21 class PageScaleConstraintsSet; 25 class PageScaleConstraintsSet;
22 class WebInputEvent; 26 class WebInputEvent;
23 class WebKeyboardEvent; 27 class WebKeyboardEvent;
24 class WebLocalFrameImpl; 28 class WebLocalFrameImpl;
25 class WebLayerTreeView; 29 class WebLayerTreeView;
26 class WebPagePopupImpl; 30 class WebPagePopupImpl;
27 class WebSettingsImpl; 31 class WebSettingsImpl;
28 struct WebRect; 32 struct WebRect;
29 33
30 // WebViewBase is a temporary class introduced to decouple the defintion of 34 // WebViewBase is a temporary class introduced to decouple the defintion of
(...skipping 10 matching lines...) Expand all
41 virtual void ClearBaseBackgroundColorOverride() = 0; 45 virtual void ClearBaseBackgroundColorOverride() = 0;
42 virtual void SetBackgroundColorOverride(WebColor) = 0; 46 virtual void SetBackgroundColorOverride(WebColor) = 0;
43 virtual void ClearBackgroundColorOverride() = 0; 47 virtual void ClearBackgroundColorOverride() = 0;
44 virtual void SetZoomFactorOverride(float) = 0; 48 virtual void SetZoomFactorOverride(float) = 0;
45 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0; 49 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0;
46 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0; 50 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0;
47 virtual void SetShowDebugBorders(bool) = 0; 51 virtual void SetShowDebugBorders(bool) = 0;
48 52
49 virtual Page* GetPage() const = 0; 53 virtual Page* GetPage() const = 0;
50 virtual Frame* FocusedCoreFrame() const = 0; 54 virtual Frame* FocusedCoreFrame() const = 0;
55 static WebViewBase* FromPage(Page*);
51 56
52 // Returns the main frame associated with this view. This may be null when 57 // Returns the main frame associated with this view. This may be null when
53 // the page is shutting down, but will be valid at all other times. 58 // the page is shutting down, but will be valid at all other times.
54 virtual WebLocalFrameImpl* MainFrameImpl() const = 0; 59 virtual WebLocalFrameImpl* MainFrameImpl() const = 0;
55 60
56 virtual float DefaultMinimumPageScaleFactor() const = 0; 61 virtual float DefaultMinimumPageScaleFactor() const = 0;
57 virtual float DefaultMaximumPageScaleFactor() const = 0; 62 virtual float DefaultMaximumPageScaleFactor() const = 0;
58 virtual float MinimumPageScaleFactor() const = 0; 63 virtual float MinimumPageScaleFactor() const = 0;
59 virtual float MaximumPageScaleFactor() const = 0; 64 virtual float MaximumPageScaleFactor() const = 0;
60 virtual float ClampPageScaleFactorToLimits(float) const = 0; 65 virtual float ClampPageScaleFactorToLimits(float) const = 0;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 virtual void DidUpdateFullscreenSize() = 0; 103 virtual void DidUpdateFullscreenSize() = 0;
99 virtual void SetLastHiddenPagePopup(WebPagePopupImpl*) = 0; 104 virtual void SetLastHiddenPagePopup(WebPagePopupImpl*) = 0;
100 virtual WebInputEventResult SendContextMenuEvent(const WebKeyboardEvent&) = 0; 105 virtual WebInputEventResult SendContextMenuEvent(const WebKeyboardEvent&) = 0;
101 106
102 virtual WebSpellCheckClient* SpellCheckClient() = 0; 107 virtual WebSpellCheckClient* SpellCheckClient() = 0;
103 108
104 virtual CompositorAnimationTimeline* LinkHighlightsTimeline() const = 0; 109 virtual CompositorAnimationTimeline* LinkHighlightsTimeline() const = 0;
105 110
106 virtual WebSettingsImpl* SettingsImpl() = 0; 111 virtual WebSettingsImpl* SettingsImpl() = 0;
107 112
113 virtual PagePopup* OpenPagePopup(PagePopupClient*) = 0;
114 virtual void ClosePagePopup(PagePopup*) = 0;
115 virtual void CleanupPagePopup() = 0;
116 virtual LocalDOMWindow* PagePopupWindow() const = 0;
117
118 virtual void InvalidateRect(const IntRect&) = 0;
119 // Indicates two things:
120 // 1) This view may have a new layout now.
121 // 2) Calling updateAllLifecyclePhases() is a no-op.
122 // After calling WebWidget::updateAllLifecyclePhases(), expect to get this
123 // notification unless the view did not need a layout.
124 virtual void LayoutUpdated(WebLocalFrameImpl*) = 0;
125 virtual void ResizeAfterLayout(WebLocalFrameImpl*) = 0;
126
127 virtual void UpdatePageDefinedViewportConstraints(
128 const ViewportDescription&) = 0;
129
130 virtual void EnterFullscreen(LocalFrame&) = 0;
131 virtual void ExitFullscreen(LocalFrame&) = 0;
132 virtual void FullscreenElementChanged(Element*, Element*) = 0;
133
134 virtual bool HasOpenedPopup() const = 0;
135
136 // Returns true if popup menus should be rendered by the browser, false if
137 // they should be rendered by WebKit (which is the default).
138 static bool UseExternalPopupMenus();
139
140 virtual GraphicsLayer* RootGraphicsLayer() = 0;
141 virtual void RegisterViewportLayersWithCompositor() = 0;
142 virtual PaintLayerCompositor* Compositor() const = 0;
143
144 virtual void DidUpdateBrowserControls() = 0;
145 virtual FloatSize ElasticOverscroll() const = 0;
146 virtual double LastFrameTimeMonotonic() const = 0;
147
108 static const WebInputEvent* CurrentInputEvent(); 148 static const WebInputEvent* CurrentInputEvent();
109 }; 149 };
110 } 150 }
111 151
112 #endif 152 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698