| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 WebInputEventResult handleInputEvent(const WebInputEvent&) override; | 58 WebInputEventResult handleInputEvent(const WebInputEvent&) override; |
| 58 void setCursorVisibilityState(bool isVisible) override; | 59 void setCursorVisibilityState(bool isVisible) override; |
| 59 bool hasTouchEventHandlersAt(const WebPoint&) override; | 60 bool hasTouchEventHandlersAt(const WebPoint&) override; |
| 60 void applyViewportDeltas(const WebFloatSize& visualViewportDelta, | 61 void applyViewportDeltas(const WebFloatSize& visualViewportDelta, |
| 61 const WebFloatSize& layoutViewportDelta, | 62 const WebFloatSize& layoutViewportDelta, |
| 62 const WebFloatSize& elasticOverscrollDelta, | 63 const WebFloatSize& elasticOverscrollDelta, |
| 63 float scaleFactor, | 64 float scaleFactor, |
| 64 float browserControlsShownRatioDelta) override; | 65 float browserControlsShownRatioDelta) override; |
| 65 void mouseCaptureLost() override; | 66 void mouseCaptureLost() override; |
| 66 void setFocus(bool) override; | 67 void setFocus(bool) override; |
| 67 bool setComposition(const WebString& text, | |
| 68 const WebVector<WebCompositionUnderline>& underlines, | |
| 69 int selectionStart, | |
| 70 int selectionEnd) override; | |
| 71 bool commitText(const WebString& text, int relativeCaretPosition) override; | |
| 72 bool finishComposingText( | |
| 73 ConfirmCompositionBehavior selectionBehavior) override; | |
| 74 WebRange compositionRange() override; | 68 WebRange compositionRange() override; |
| 75 WebTextInputInfo textInputInfo() override; | 69 WebTextInputInfo textInputInfo() override; |
| 76 WebTextInputType textInputType() override; | 70 WebTextInputType textInputType() override; |
| 77 bool selectionBounds(WebRect& anchor, WebRect& focus) const override; | 71 bool selectionBounds(WebRect& anchor, WebRect& focus) const override; |
| 78 bool selectionTextDirection(WebTextDirection& start, | 72 bool selectionTextDirection(WebTextDirection& start, |
| 79 WebTextDirection& end) const override; | 73 WebTextDirection& end) const override; |
| 80 bool isSelectionAnchorFirst() const override; | 74 bool isSelectionAnchorFirst() const override; |
| 81 WebRange caretOrSelectionRange() override; | 75 WebRange caretOrSelectionRange() override; |
| 82 void setTextDirection(WebTextDirection) override; | 76 void setTextDirection(WebTextDirection) override; |
| 83 bool isAcceleratedCompositingActive() const override; | 77 bool isAcceleratedCompositingActive() const override; |
| 84 bool isWebView() const override { return false; } | 78 bool isWebView() const override { return false; } |
| 85 bool isPagePopup() const override { return false; } | 79 bool isPagePopup() const override { return false; } |
| 86 void willCloseLayerTreeView() override; | 80 void willCloseLayerTreeView() override; |
| 87 void didAcquirePointerLock() override; | 81 void didAcquirePointerLock() override; |
| 88 void didNotAcquirePointerLock() override; | 82 void didNotAcquirePointerLock() override; |
| 89 void didLosePointerLock() override; | 83 void didLosePointerLock() override; |
| 90 WebColor backgroundColor() const override; | 84 WebColor backgroundColor() const override; |
| 91 WebPagePopup* pagePopup() const override; | 85 WebPagePopup* pagePopup() const override; |
| 92 bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; | 86 bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; |
| 93 void applyReplacementRange(const WebRange&) override; | 87 void applyReplacementRange(const WebRange&) override; |
| 94 void updateBrowserControlsState(WebBrowserControlsState constraints, | 88 void updateBrowserControlsState(WebBrowserControlsState constraints, |
| 95 WebBrowserControlsState current, | 89 WebBrowserControlsState current, |
| 96 bool animate) override; | 90 bool animate) override; |
| 97 void setVisibilityState(WebPageVisibilityState) override; | 91 void setVisibilityState(WebPageVisibilityState) override; |
| 98 bool isTransparent() const override; | 92 bool isTransparent() const override; |
| 99 void setIsTransparent(bool) override; | 93 void setIsTransparent(bool) override; |
| 100 void setBaseBackgroundColor(WebColor) override; | 94 void setBaseBackgroundColor(WebColor) override; |
| 101 WebLocalFrameImpl* localRoot() override; | 95 WebLocalFrameImpl* localRoot() override; |
| 96 WebInputMethodControllerImpl* getActiveWebInputMethodController() |
| 97 const override; |
| 102 | 98 |
| 103 // WebFrameWidgetBase overrides: | 99 // WebFrameWidgetBase overrides: |
| 104 bool forSubframe() const override { return false; } | 100 bool forSubframe() const override { return false; } |
| 105 void scheduleAnimation() override; | 101 void scheduleAnimation() override; |
| 106 CompositorProxyClient* createCompositorProxyClient() override; | 102 CompositorProxyClient* createCompositorProxyClient() override; |
| 107 void setRootGraphicsLayer(GraphicsLayer*) override; | 103 void setRootGraphicsLayer(GraphicsLayer*) override; |
| 108 void setRootLayer(WebLayer*) override; | 104 void setRootLayer(WebLayer*) override; |
| 109 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; | 105 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; |
| 110 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; | 106 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; |
| 111 WebWidgetClient* client() const override { return m_client; } | 107 WebWidgetClient* client() const override { return m_client; } |
| 112 HitTestResult coreHitTestResultAt(const WebPoint&) override; | 108 HitTestResult coreHitTestResultAt(const WebPoint&) override; |
| 113 | 109 |
| 114 private: | 110 private: |
| 115 WebWidgetClient* m_client; | 111 WebWidgetClient* m_client; |
| 116 RefPtr<WebViewImpl> m_webView; | 112 RefPtr<WebViewImpl> m_webView; |
| 117 Persistent<WebLocalFrameImpl> m_mainFrame; | 113 Persistent<WebLocalFrameImpl> m_mainFrame; |
| 118 }; | 114 }; |
| 119 | 115 |
| 120 } // namespace blink | 116 } // namespace blink |
| 121 | 117 |
| 122 #endif // WebViewFrameWidget_h | 118 #endif // WebViewFrameWidget_h |
| OLD | NEW |