Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #ifndef WebViewBase_h | |
|
haraken
2017/04/27 12:42:04
Add a copyright.
slangley
2017/04/28 00:16:21
Done!
| |
| 2 #define WebViewBase_h | |
| 3 | |
| 4 #include "platform/transforms/TransformationMatrix.h" | |
| 5 #include "public/platform/WebDisplayMode.h" | |
| 6 #include "public/platform/WebInputEventResult.h" | |
| 7 #include "public/web/WebElement.h" | |
| 8 #include "public/web/WebView.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class CompositorAnimationTimeline; | |
| 13 class ContextMenuProvider; | |
| 14 class DevToolsEmulator; | |
| 15 class Frame; | |
| 16 class Page; | |
| 17 class PageScaleConstraintsSet; | |
| 18 class WebInputEvent; | |
| 19 class WebKeyboardEvent; | |
| 20 class WebLocalFrameImpl; | |
| 21 class WebLayerTreeView; | |
| 22 class WebPagePopupImpl; | |
| 23 class WebSettingsImpl; | |
| 24 struct WebRect; | |
| 25 | |
| 26 // WebViewBase is a temporary class introduced to decouple the defintion of | |
| 27 // WebViewImpl from the concrete implementation. It was not possible to move the | |
| 28 // defintion of these methods to WebView as we did not want to pollute the | |
| 29 // public API surface area. | |
| 30 // | |
| 31 // Once WebViewImpl is moved from web to core/exported then this class should be | |
| 32 // removed and clients can once again depend on WebViewImpl. | |
| 33 class WebViewBase : public WebView { | |
| 34 public: | |
| 35 virtual void SetBaseBackgroundColor(WebColor) = 0; | |
| 36 virtual void SetBaseBackgroundColorOverride(WebColor) = 0; | |
| 37 virtual void ClearBaseBackgroundColorOverride() = 0; | |
| 38 virtual void SetBackgroundColorOverride(WebColor) = 0; | |
| 39 virtual void ClearBackgroundColorOverride() = 0; | |
| 40 virtual void SetZoomFactorOverride(float) = 0; | |
| 41 virtual void SetCompositorDeviceScaleFactorOverride(float) = 0; | |
| 42 virtual void SetDeviceEmulationTransform(const TransformationMatrix&) = 0; | |
| 43 virtual void SetShowDebugBorders(bool) = 0; | |
| 44 | |
| 45 virtual Page* GetPage() const = 0; | |
| 46 virtual Frame* FocusedCoreFrame() const = 0; | |
| 47 | |
| 48 // Returns the main frame associated with this view. This may be null when | |
| 49 // the page is shutting down, but will be valid at all other times. | |
| 50 virtual WebLocalFrameImpl* MainFrameImpl() const = 0; | |
| 51 | |
| 52 virtual float DefaultMinimumPageScaleFactor() const = 0; | |
| 53 virtual float DefaultMaximumPageScaleFactor() const = 0; | |
| 54 virtual float MinimumPageScaleFactor() const = 0; | |
| 55 virtual float MaximumPageScaleFactor() const = 0; | |
| 56 virtual float ClampPageScaleFactorToLimits(float) const = 0; | |
| 57 virtual void ResetScaleStateImmediately() = 0; | |
| 58 | |
| 59 virtual WebLayerTreeView* LayerTreeView() const = 0; | |
| 60 virtual WebViewClient* Client() = 0; | |
| 61 | |
| 62 virtual void ZoomToFindInPageRect(const WebRect&) = 0; | |
| 63 | |
| 64 virtual PageScaleConstraintsSet& GetPageScaleConstraintsSet() const = 0; | |
| 65 virtual Color BaseBackgroundColor() const = 0; | |
| 66 virtual bool BackgroundColorOverrideEnabled() const = 0; | |
| 67 virtual WebColor BackgroundColorOverride() const = 0; | |
| 68 | |
| 69 virtual void DidChangeContentsSize() = 0; | |
| 70 virtual void PageScaleFactorChanged() = 0; | |
| 71 virtual void MainFrameScrollOffsetChanged() = 0; | |
| 72 virtual void UpdateMainFrameLayoutSize() = 0; | |
| 73 | |
| 74 virtual DevToolsEmulator* GetDevToolsEmulator() const = 0; | |
| 75 | |
| 76 // Notifies the WebView that a load has been committed. isNewNavigation | |
| 77 // will be true if a new session history item should be created for that | |
| 78 // load. isNavigationWithinPage will be true if the navigation does | |
| 79 // not take the user away from the current page. | |
| 80 virtual void DidCommitLoad(bool is_new_navigation, | |
| 81 bool is_navigation_within_page) = 0; | |
| 82 | |
| 83 virtual void ShowContextMenuAtPoint(float x, | |
| 84 float y, | |
| 85 ContextMenuProvider*) = 0; | |
| 86 virtual void ShowContextMenuForElement(WebElement) = 0; | |
| 87 | |
| 88 virtual IntSize MainFrameSize() = 0; | |
| 89 virtual bool ShouldAutoResize() const = 0; | |
| 90 virtual IntSize MinAutoSize() const = 0; | |
| 91 virtual IntSize MaxAutoSize() const = 0; | |
| 92 virtual WebDisplayMode DisplayMode() const = 0; | |
| 93 | |
| 94 virtual void DidUpdateFullscreenSize() = 0; | |
| 95 virtual void SetLastHiddenPagePopup(WebPagePopupImpl*) = 0; | |
| 96 virtual WebInputEventResult SendContextMenuEvent(const WebKeyboardEvent&) = 0; | |
| 97 | |
| 98 virtual WebSpellCheckClient* SpellCheckClient() = 0; | |
| 99 | |
| 100 virtual CompositorAnimationTimeline* LinkHighlightsTimeline() const = 0; | |
| 101 | |
| 102 virtual WebSettingsImpl* SettingsImpl() = 0; | |
| 103 | |
| 104 static const WebInputEvent* CurrentInputEvent(); | |
| 105 }; | |
| 106 } | |
| 107 | |
| 108 #endif | |
| OLD | NEW |