| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be found | 2 // Use of this source code is governed by a BSD-style license that can be found |
| 3 // in the LICENSE file. | 3 // in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebViewFrameWidget_h | 5 #ifndef WebViewFrameWidget_h |
| 6 #define WebViewFrameWidget_h | 6 #define WebViewFrameWidget_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 #include "web/WebFrameWidgetBase.h" | 9 #include "web/WebFrameWidgetBase.h" |
| 10 #include "web/WebInputMethodControllerImpl.h" |
| 10 #include "web/WebLocalFrameImpl.h" | 11 #include "web/WebLocalFrameImpl.h" |
| 11 #include "wtf/Noncopyable.h" | 12 #include "wtf/Noncopyable.h" |
| 12 #include "wtf/RefPtr.h" | 13 #include "wtf/RefPtr.h" |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 | 16 |
| 16 class WebViewImpl; | 17 class WebViewImpl; |
| 17 class WebWidgetClient; | 18 class WebWidgetClient; |
| 18 | 19 |
| 19 // Shim class to help normalize the widget interfaces in the Blink public API. | 20 // Shim class to help normalize the widget interfaces in the Blink public API. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void setCursorVisibilityState(bool isVisible) override; | 55 void setCursorVisibilityState(bool isVisible) override; |
| 55 bool hasTouchEventHandlersAt(const WebPoint&) override; | 56 bool hasTouchEventHandlersAt(const WebPoint&) override; |
| 56 void applyViewportDeltas( | 57 void applyViewportDeltas( |
| 57 const WebFloatSize& visualViewportDelta, | 58 const WebFloatSize& visualViewportDelta, |
| 58 const WebFloatSize& layoutViewportDelta, | 59 const WebFloatSize& layoutViewportDelta, |
| 59 const WebFloatSize& elasticOverscrollDelta, | 60 const WebFloatSize& elasticOverscrollDelta, |
| 60 float scaleFactor, | 61 float scaleFactor, |
| 61 float topControlsShownRatioDelta) override; | 62 float topControlsShownRatioDelta) override; |
| 62 void mouseCaptureLost() override; | 63 void mouseCaptureLost() override; |
| 63 void setFocus(bool) override; | 64 void setFocus(bool) override; |
| 64 bool setComposition( | |
| 65 const WebString& text, | |
| 66 const WebVector<WebCompositionUnderline>& underlines, | |
| 67 int selectionStart, | |
| 68 int selectionEnd) override; | |
| 69 bool commitText(const WebString& text, int relativeCaretPosition) override; | |
| 70 bool finishComposingText(ConfirmCompositionBehavior selectionBehavior) overr
ide; | |
| 71 WebRange compositionRange() override; | 65 WebRange compositionRange() override; |
| 72 WebTextInputInfo textInputInfo() override; | 66 WebTextInputInfo textInputInfo() override; |
| 73 WebTextInputType textInputType() override; | 67 WebTextInputType textInputType() override; |
| 74 bool selectionBounds(WebRect& anchor, WebRect& focus) const override; | 68 bool selectionBounds(WebRect& anchor, WebRect& focus) const override; |
| 75 bool selectionTextDirection(WebTextDirection& start, WebTextDirection& end)
const override; | 69 bool selectionTextDirection(WebTextDirection& start, WebTextDirection& end)
const override; |
| 76 bool isSelectionAnchorFirst() const override; | 70 bool isSelectionAnchorFirst() const override; |
| 77 WebRange caretOrSelectionRange() override; | 71 WebRange caretOrSelectionRange() override; |
| 78 void setTextDirection(WebTextDirection) override; | 72 void setTextDirection(WebTextDirection) override; |
| 79 bool isAcceleratedCompositingActive() const override; | 73 bool isAcceleratedCompositingActive() const override; |
| 80 bool isWebView() const override { return false; } | 74 bool isWebView() const override { return false; } |
| 81 bool isPagePopup() const override { return false; } | 75 bool isPagePopup() const override { return false; } |
| 82 void willCloseLayerTreeView() override; | 76 void willCloseLayerTreeView() override; |
| 83 void didAcquirePointerLock() override; | 77 void didAcquirePointerLock() override; |
| 84 void didNotAcquirePointerLock() override; | 78 void didNotAcquirePointerLock() override; |
| 85 void didLosePointerLock() override; | 79 void didLosePointerLock() override; |
| 86 void didChangeWindowResizerRect() override; | 80 void didChangeWindowResizerRect() override; |
| 87 WebColor backgroundColor() const override; | 81 WebColor backgroundColor() const override; |
| 88 WebPagePopup* pagePopup() const override; | 82 WebPagePopup* pagePopup() const override; |
| 89 bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; | 83 bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; |
| 90 void applyReplacementRange(const WebRange&) override; | 84 void applyReplacementRange(const WebRange&) override; |
| 91 void updateTopControlsState(WebTopControlsState constraints, WebTopControlsS
tate current, bool animate) override; | 85 void updateTopControlsState(WebTopControlsState constraints, WebTopControlsS
tate current, bool animate) override; |
| 92 void setVisibilityState(WebPageVisibilityState) override; | 86 void setVisibilityState(WebPageVisibilityState) override; |
| 93 bool isTransparent() const override; | 87 bool isTransparent() const override; |
| 94 void setIsTransparent(bool) override; | 88 void setIsTransparent(bool) override; |
| 95 void setBaseBackgroundColor(WebColor) override; | 89 void setBaseBackgroundColor(WebColor) override; |
| 96 WebLocalFrameImpl* localRoot() override; | 90 WebLocalFrameImpl* localRoot() override; |
| 91 WebInputMethodControllerImpl* getActiveWebInputMethodController() const over
ride; |
| 97 | 92 |
| 98 // WebFrameWidgetBase overrides: | 93 // WebFrameWidgetBase overrides: |
| 99 bool forSubframe() const override { return false; } | 94 bool forSubframe() const override { return false; } |
| 100 void scheduleAnimation() override; | 95 void scheduleAnimation() override; |
| 101 CompositorProxyClient* createCompositorProxyClient() override; | 96 CompositorProxyClient* createCompositorProxyClient() override; |
| 102 void setRootGraphicsLayer(GraphicsLayer*) override; | 97 void setRootGraphicsLayer(GraphicsLayer*) override; |
| 103 void setRootLayer(WebLayer*) override; | 98 void setRootLayer(WebLayer*) override; |
| 104 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; | 99 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; |
| 105 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; | 100 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; |
| 106 WebWidgetClient* client() const override { return m_client; } | 101 WebWidgetClient* client() const override { return m_client; } |
| 107 HitTestResult coreHitTestResultAt(const WebPoint&) override; | 102 HitTestResult coreHitTestResultAt(const WebPoint&) override; |
| 108 | 103 |
| 109 private: | 104 private: |
| 110 WebWidgetClient* m_client; | 105 WebWidgetClient* m_client; |
| 111 RefPtr<WebViewImpl> m_webView; | 106 RefPtr<WebViewImpl> m_webView; |
| 112 Persistent<WebLocalFrameImpl> m_mainFrame; | 107 Persistent<WebLocalFrameImpl> m_mainFrame; |
| 113 }; | 108 }; |
| 114 | 109 |
| 115 } // namespace blink | 110 } // namespace blink |
| 116 | 111 |
| 117 #endif // WebViewFrameWidget_h | 112 #endif // WebViewFrameWidget_h |
| OLD | NEW |