| 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/WebLocalFrameImpl.h" |
| 10 #include "wtf/Noncopyable.h" | 11 #include "wtf/Noncopyable.h" |
| 11 #include "wtf/RefPtr.h" | 12 #include "wtf/RefPtr.h" |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 15 class WebLocalFrameImpl; | |
| 16 class WebViewImpl; | 16 class WebViewImpl; |
| 17 class WebWidgetClient; | 17 class WebWidgetClient; |
| 18 | 18 |
| 19 // Shim class to help normalize the widget interfaces in the Blink public API. | 19 // Shim class to help normalize the widget interfaces in the Blink public API. |
| 20 // For OOPI, subframes have WebFrameWidgets for input and rendering. | 20 // For OOPI, subframes have WebFrameWidgets for input and rendering. |
| 21 // Unfortunately, the main frame still uses WebView's WebWidget for input and | 21 // Unfortunately, the main frame still uses WebView's WebWidget for input and |
| 22 // rendering. This results in complex code, since there are two different | 22 // rendering. This results in complex code, since there are two different |
| 23 // implementations of WebWidget and code needs to have branches to handle both | 23 // implementations of WebWidget and code needs to have branches to handle both |
| 24 // cases. | 24 // cases. |
| 25 // This class allows a Blink embedder to create a WebFrameWidget that can be | 25 // This class allows a Blink embedder to create a WebFrameWidget that can be |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void didNotAcquirePointerLock() override; | 85 void didNotAcquirePointerLock() override; |
| 86 void didLosePointerLock() override; | 86 void didLosePointerLock() override; |
| 87 void didChangeWindowResizerRect() override; | 87 void didChangeWindowResizerRect() override; |
| 88 WebColor backgroundColor() const override; | 88 WebColor backgroundColor() const override; |
| 89 WebPagePopup* pagePopup() const override; | 89 WebPagePopup* pagePopup() const override; |
| 90 void updateTopControlsState(WebTopControlsState constraints, WebTopControlsS
tate current, bool animate) override; | 90 void updateTopControlsState(WebTopControlsState constraints, WebTopControlsS
tate current, bool animate) override; |
| 91 void setVisibilityState(WebPageVisibilityState) override; | 91 void setVisibilityState(WebPageVisibilityState) override; |
| 92 bool isTransparent() const override; | 92 bool isTransparent() const override; |
| 93 void setIsTransparent(bool) override; | 93 void setIsTransparent(bool) override; |
| 94 void setBaseBackgroundColor(WebColor) override; | 94 void setBaseBackgroundColor(WebColor) override; |
| 95 WebLocalFrameImpl* localRoot() override; |
| 95 | 96 |
| 96 // WebFrameWidgetBase overrides: | 97 // WebFrameWidgetBase overrides: |
| 97 bool forSubframe() const override { return false; } | 98 bool forSubframe() const override { return false; } |
| 98 void scheduleAnimation() override; | 99 void scheduleAnimation() override; |
| 99 CompositorProxyClient* createCompositorProxyClient() override; | 100 CompositorProxyClient* createCompositorProxyClient() override; |
| 100 void setRootGraphicsLayer(GraphicsLayer*) override; | 101 void setRootGraphicsLayer(GraphicsLayer*) override; |
| 101 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; | 102 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; |
| 102 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; | 103 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) overrid
e; |
| 103 WebWidgetClient* client() const override { return m_client; } | 104 WebWidgetClient* client() const override { return m_client; } |
| 104 | 105 |
| 105 private: | 106 private: |
| 106 WebWidgetClient* m_client; | 107 WebWidgetClient* m_client; |
| 107 RefPtr<WebViewImpl> m_webView; | 108 RefPtr<WebViewImpl> m_webView; |
| 108 Persistent<WebLocalFrameImpl> m_mainFrame; | 109 Persistent<WebLocalFrameImpl> m_mainFrame; |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace blink | 112 } // namespace blink |
| 112 | 113 |
| 113 #endif // WebViewFrameWidget_h | 114 #endif // WebViewFrameWidget_h |
| OLD | NEW |