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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.h

Issue 2385333002: RenderWidgetHostViewChildFrame's called a virtual in its ctor. (Closed)
Patch Set: Move other functions that invoke methods passing "this" into functions inside the Init method Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 27 matching lines...) Expand all
38 // content and therefore inherits from RenderWidgetHostViewChildFrame. 38 // content and therefore inherits from RenderWidgetHostViewChildFrame.
39 // Eventually all RenderWidgetHostViewGuest code will be subsumed by 39 // Eventually all RenderWidgetHostViewGuest code will be subsumed by
40 // RenderWidgetHostViewChildFrame and this class will be removed. 40 // RenderWidgetHostViewChildFrame and this class will be removed.
41 // 41 //
42 // Some elements that are platform specific will be deal with by delegating 42 // Some elements that are platform specific will be deal with by delegating
43 // the relevant calls to the platform view. 43 // the relevant calls to the platform view.
44 class CONTENT_EXPORT RenderWidgetHostViewGuest 44 class CONTENT_EXPORT RenderWidgetHostViewGuest
45 : public RenderWidgetHostViewChildFrame, 45 : public RenderWidgetHostViewChildFrame,
46 public ui::GestureConsumer { 46 public ui::GestureConsumer {
47 public: 47 public:
48 RenderWidgetHostViewGuest( 48 static RenderWidgetHostViewGuest* Create(
49 RenderWidgetHost* widget, 49 RenderWidgetHost* widget,
50 BrowserPluginGuest* guest, 50 BrowserPluginGuest* guest,
51 base::WeakPtr<RenderWidgetHostViewBase> platform_view); 51 base::WeakPtr<RenderWidgetHostViewBase> platform_view);
52 ~RenderWidgetHostViewGuest() override; 52 ~RenderWidgetHostViewGuest() override;
53 53
54 bool OnMessageReceivedFromEmbedder(const IPC::Message& message, 54 bool OnMessageReceivedFromEmbedder(const IPC::Message& message,
55 RenderWidgetHostImpl* embedder); 55 RenderWidgetHostImpl* embedder);
56 56
57 // RenderWidgetHostView implementation. 57 // RenderWidgetHostView implementation.
58 bool OnMessageReceived(const IPC::Message& msg) override; 58 bool OnMessageReceived(const IPC::Message& msg) override;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 InputEventAckState ack_result) override; 124 InputEventAckState ack_result) override;
125 125
126 void GestureEventAck(const blink::WebGestureEvent& event, 126 void GestureEventAck(const blink::WebGestureEvent& event,
127 InputEventAckState ack_result) override; 127 InputEventAckState ack_result) override;
128 128
129 bool IsRenderWidgetHostViewGuest() override; 129 bool IsRenderWidgetHostViewGuest() override;
130 130
131 protected: 131 protected:
132 friend class RenderWidgetHostView; 132 friend class RenderWidgetHostView;
133 133
134 RenderWidgetHostViewGuest(
clamy 2016/10/05 15:29:49 It seems that no class inherits from RenderWidgetH
dtapuska 2016/10/05 15:37:05 Done.
135 RenderWidgetHost* widget,
136 BrowserPluginGuest* guest,
137 base::WeakPtr<RenderWidgetHostViewBase> platform_view);
138
134 private: 139 private:
135 RenderWidgetHostViewBase* GetOwnerRenderWidgetHostView() const; 140 RenderWidgetHostViewBase* GetOwnerRenderWidgetHostView() const;
136 141
137 // Since we now route GestureEvents directly to the guest renderer, we need 142 // Since we now route GestureEvents directly to the guest renderer, we need
138 // a way to make sure that the BrowserPlugin in the embedder gets focused so 143 // a way to make sure that the BrowserPlugin in the embedder gets focused so
139 // that keyboard input (which still travels via BrowserPlugin) is routed to 144 // that keyboard input (which still travels via BrowserPlugin) is routed to
140 // the plugin and thus onwards to the guest. 145 // the plugin and thus onwards to the guest.
141 // TODO(wjmaclean): When we remove BrowserPlugin, delete this code. 146 // TODO(wjmaclean): When we remove BrowserPlugin, delete this code.
142 // http://crbug.com/533069 147 // http://crbug.com/533069
143 void MaybeSendSyntheticTapGesture( 148 void MaybeSendSyntheticTapGesture(
(...skipping 11 matching lines...) Expand all
155 // The platform view for this RenderWidgetHostView. 160 // The platform view for this RenderWidgetHostView.
156 // RenderWidgetHostViewGuest mostly only cares about stuff related to 161 // RenderWidgetHostViewGuest mostly only cares about stuff related to
157 // compositing, the rest are directly forwarded to this |platform_view_|. 162 // compositing, the rest are directly forwarded to this |platform_view_|.
158 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; 163 base::WeakPtr<RenderWidgetHostViewBase> platform_view_;
159 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); 164 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest);
160 }; 165 };
161 166
162 } // namespace content 167 } // namespace content
163 168
164 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ 169 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698