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

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

Issue 2848513002: Introduce the abstract class WebViewBase, to decouple WebViewImpl. (Closed)
Patch Set: Fix typo. 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.#ifndef WebViewBase_h
4
5 #ifndef WebViewBase_h
6 #define WebViewBase_h
7
8 #include "platform/transforms/TransformationMatrix.h"
9 #include "public/platform/WebDisplayMode.h"
10 #include "public/platform/WebInputEventResult.h"
11 #include "public/web/WebElement.h"
12 #include "public/web/WebView.h"
13
14 namespace blink {
15
16 class CompositorAnimationTimeline;
17 class ContextMenuProvider;
18 class DevToolsEmulator;
19 class Frame;
20 class Page;
21 class PageScaleConstraintsSet;
22 class WebInputEvent;
23 class WebKeyboardEvent;
24 class WebLocalFrameImpl;
25 class WebLayerTreeView;
26 class WebPagePopupImpl;
27 class WebSettingsImpl;
28 struct WebRect;
29
30 // WebViewBase is a temporary class introduced to decouple the defintion of
31 // WebViewImpl from the concrete implementation. It was not possible to move the
32 // defintion of these methods to WebView as we did not want to pollute the
33 // public API surface area.
34 //
35 // Once WebViewImpl is moved from web to core/exported then this class should be
36 // removed and clients can once again depend on WebViewImpl.
37 class WebViewBase : public WebView {
38 public:
39 virtual void SetBaseBackgroundColor(WebColor) = 0;
40 virtual void SetBaseBackgroundColorOverride(WebColor) = 0;
41 virtual void ClearBaseBackgroundColorOverride() = 0;
42 virtual void SetBackgroundColorOverride(WebColor) = 0;
43 virtual void ClearBackgroundColorOverride() = 0;
44 virtual void SetZoomFactorOverride(float) = 0;
45 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0;
46 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0;
47 virtual void SetShowDebugBorders(bool) = 0;
48
49 virtual Page* GetPage() const = 0;
50 virtual Frame* FocusedCoreFrame() const = 0;
51
52 // 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.
54 virtual WebLocalFrameImpl* MainFrameImpl() const = 0;
55
56 virtual float DefaultMinimumPageScaleFactor() const = 0;
57 virtual float DefaultMaximumPageScaleFactor() const = 0;
58 virtual float MinimumPageScaleFactor() const = 0;
59 virtual float MaximumPageScaleFactor() const = 0;
60 virtual float ClampPageScaleFactorToLimits(float) const = 0;
61 virtual void ResetScaleStateImmediately() = 0;
62
63 virtual WebLayerTreeView* LayerTreeView() const = 0;
64 virtual WebViewClient* Client() = 0;
65
66 virtual void ZoomToFindInPageRect(const WebRect&) = 0;
67
68 virtual PageScaleConstraintsSet& GetPageScaleConstraintsSet() const = 0;
69 virtual Color BaseBackgroundColor() const = 0;
70 virtual bool BackgroundColorOverrideEnabled() const = 0;
71 virtual WebColor BackgroundColorOverride() const = 0;
72
73 virtual void DidChangeContentsSize() = 0;
74 virtual void PageScaleFactorChanged() = 0;
75 virtual void MainFrameScrollOffsetChanged() = 0;
76 virtual void UpdateMainFrameLayoutSize() = 0;
77
78 virtual DevToolsEmulator* GetDevToolsEmulator() const = 0;
79
80 // Notifies the WebView that a load has been committed. isNewNavigation
81 // will be true if a new session history item should be created for that
82 // load. isNavigationWithinPage will be true if the navigation does
83 // not take the user away from the current page.
84 virtual void DidCommitLoad(bool is_new_navigation,
85 bool is_navigation_within_page) = 0;
86
87 virtual void ShowContextMenuAtPoint(float x,
88 float y,
89 ContextMenuProvider*) = 0;
90 virtual void ShowContextMenuForElement(WebElement) = 0;
91
92 virtual IntSize MainFrameSize() = 0;
93 virtual bool ShouldAutoResize() const = 0;
94 virtual IntSize MinAutoSize() const = 0;
95 virtual IntSize MaxAutoSize() const = 0;
96 virtual WebDisplayMode DisplayMode() const = 0;
97
98 virtual void DidUpdateFullscreenSize() = 0;
99 virtual void SetLastHiddenPagePopup(WebPagePopupImpl*) = 0;
100 virtual WebInputEventResult SendContextMenuEvent(const WebKeyboardEvent&) = 0;
101
102 virtual WebSpellCheckClient* SpellCheckClient() = 0;
103
104 virtual CompositorAnimationTimeline* LinkHighlightsTimeline() const = 0;
105
106 virtual WebSettingsImpl* SettingsImpl() = 0;
107
108 static const WebInputEvent* CurrentInputEvent();
109 };
110 }
111
112 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/exported/BUILD.gn ('k') | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698