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

Side by Side Diff: third_party/WebKit/Source/web/WebViewFrameWidget.h

Issue 2850113002: Move WebViewFrameWidget to use WebViewBase rather than WebViewImpl. (Closed)
Patch Set: Fix code review comments. 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
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 "platform/wtf/Noncopyable.h" 9 #include "platform/wtf/Noncopyable.h"
10 #include "platform/wtf/RefPtr.h" 10 #include "platform/wtf/RefPtr.h"
11 #include "web/WebFrameWidgetBase.h" 11 #include "web/WebFrameWidgetBase.h"
12 #include "web/WebInputMethodControllerImpl.h" 12 #include "web/WebInputMethodControllerImpl.h"
13 #include "web/WebLocalFrameImpl.h" 13 #include "web/WebLocalFrameImpl.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class WebViewImpl; 17 class WebViewBase;
18 class WebWidgetClient; 18 class WebWidgetClient;
19 19
20 // 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.
21 // For OOPI, subframes have WebFrameWidgets for input and rendering. 21 // For OOPI, subframes have WebFrameWidgets for input and rendering.
22 // Unfortunately, the main frame still uses WebView's WebWidget for input and 22 // Unfortunately, the main frame still uses WebView's WebWidget for input and
23 // rendering. This results in complex code, since there are two different 23 // rendering. This results in complex code, since there are two different
24 // implementations of WebWidget and code needs to have branches to handle both 24 // implementations of WebWidget and code needs to have branches to handle both
25 // cases. 25 // cases.
26 // This class allows a Blink embedder to create a WebFrameWidget that can be 26 // This class allows a Blink embedder to create a WebFrameWidget that can be
27 // used for the main frame. Internally, it currently wraps WebView's WebWidget 27 // used for the main frame. Internally, it currently wraps WebView's WebWidget
28 // and just forwards almost everything to it. 28 // and just forwards almost everything to it.
29 // After the embedder starts using a WebFrameWidget for the main frame, 29 // After the embedder starts using a WebFrameWidget for the main frame,
30 // WebView will be updated to no longer inherit WebWidget. The eventual goal is 30 // WebView will be updated to no longer inherit WebWidget. The eventual goal is
31 // to unfork the widget code duplicated in WebFrameWidgetImpl and WebViewImpl 31 // to unfork the widget code duplicated in WebFrameWidgetImpl and WebViewBase
32 // into one class. 32 // into one class.
33 // A more detailed writeup of this transition can be read at 33 // A more detailed writeup of this transition can be read at
34 // https://goo.gl/7yVrnb. 34 // https://goo.gl/7yVrnb.
35 class WebViewFrameWidget : public WebFrameWidgetBase { 35 class WebViewFrameWidget : public WebFrameWidgetBase {
36 WTF_MAKE_NONCOPYABLE(WebViewFrameWidget); 36 WTF_MAKE_NONCOPYABLE(WebViewFrameWidget);
37 37
38 public: 38 public:
39 explicit WebViewFrameWidget(WebWidgetClient&, 39 explicit WebViewFrameWidget(WebWidgetClient&,
40 WebViewImpl&, 40 WebViewBase&,
41 WebLocalFrameImpl&); 41 WebLocalFrameImpl&);
42 virtual ~WebViewFrameWidget(); 42 virtual ~WebViewFrameWidget();
43 43
44 // WebFrameWidget overrides: 44 // WebFrameWidget overrides:
45 void Close() override; 45 void Close() override;
46 WebSize Size() override; 46 WebSize Size() override;
47 void Resize(const WebSize&) override; 47 void Resize(const WebSize&) override;
48 void ResizeVisualViewport(const WebSize&) override; 48 void ResizeVisualViewport(const WebSize&) override;
49 void DidEnterFullscreen() override; 49 void DidEnterFullscreen() override;
50 void DidExitFullscreen() override; 50 void DidExitFullscreen() override;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 AnimationWorkletProxyClient* CreateAnimationWorkletProxyClient() override; 102 AnimationWorkletProxyClient* CreateAnimationWorkletProxyClient() override;
103 void SetRootGraphicsLayer(GraphicsLayer*) override; 103 void SetRootGraphicsLayer(GraphicsLayer*) override;
104 void SetRootLayer(WebLayer*) override; 104 void SetRootLayer(WebLayer*) override;
105 WebLayerTreeView* GetLayerTreeView() const override; 105 WebLayerTreeView* GetLayerTreeView() const override;
106 CompositorAnimationHost* AnimationHost() const override; 106 CompositorAnimationHost* AnimationHost() const override;
107 WebWidgetClient* Client() const override { return client_; } 107 WebWidgetClient* Client() const override { return client_; }
108 HitTestResult CoreHitTestResultAt(const WebPoint&) override; 108 HitTestResult CoreHitTestResultAt(const WebPoint&) override;
109 109
110 private: 110 private:
111 WebWidgetClient* client_; 111 WebWidgetClient* client_;
112 RefPtr<WebViewImpl> web_view_; 112 RefPtr<WebViewBase> web_view_;
113 Persistent<WebLocalFrameImpl> main_frame_; 113 Persistent<WebLocalFrameImpl> main_frame_;
114 }; 114 };
115 115
116 } // namespace blink 116 } // namespace blink
117 117
118 #endif // WebViewFrameWidget_h 118 #endif // WebViewFrameWidget_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/exported/WebViewBase.h ('k') | third_party/WebKit/Source/web/WebViewFrameWidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698