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

Side by Side Diff: content/browser/web_contents/web_contents_view_guest.cc

Issue 2385333002: RenderWidgetHostViewChildFrame's called a virtual in its ctor. (Closed)
Patch Set: Move guest ctor to private 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
« no previous file with comments | « content/browser/web_contents/web_contents_view_child_frame.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/web_contents/web_contents_view_guest.h" 5 #include "content/browser/web_contents/web_contents_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // view twice), we check for the RVH Factory, which will be set when we're 141 // view twice), we check for the RVH Factory, which will be set when we're
142 // making special ones (which go along with the special views). 142 // making special ones (which go along with the special views).
143 DCHECK(RenderViewHostFactory::has_factory()); 143 DCHECK(RenderViewHostFactory::has_factory());
144 return static_cast<RenderWidgetHostViewBase*>( 144 return static_cast<RenderWidgetHostViewBase*>(
145 render_widget_host->GetView()); 145 render_widget_host->GetView());
146 } 146 }
147 147
148 RenderWidgetHostViewBase* platform_widget = 148 RenderWidgetHostViewBase* platform_widget =
149 platform_view_->CreateViewForWidget(render_widget_host, true); 149 platform_view_->CreateViewForWidget(render_widget_host, true);
150 150
151 return new RenderWidgetHostViewGuest(render_widget_host, 151 return RenderWidgetHostViewGuest::Create(render_widget_host, guest_,
152 guest_, 152 platform_widget->GetWeakPtr());
153 platform_widget->GetWeakPtr());
154 } 153 }
155 154
156 RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget( 155 RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
157 RenderWidgetHost* render_widget_host) { 156 RenderWidgetHost* render_widget_host) {
158 return platform_view_->CreateViewForPopupWidget(render_widget_host); 157 return platform_view_->CreateViewForPopupWidget(render_widget_host);
159 } 158 }
160 159
161 void WebContentsViewGuest::SetPageTitle(const base::string16& title) { 160 void WebContentsViewGuest::SetPageTitle(const base::string16& title) {
162 } 161 }
163 162
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 embedder_render_view_host->GetDelegate()->GetDelegateView(); 240 embedder_render_view_host->GetDelegate()->GetDelegateView();
242 if (view) { 241 if (view) {
243 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); 242 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag"));
244 view->StartDragging(drop_data, ops, image, image_offset, event_info); 243 view->StartDragging(drop_data, ops, image, image_offset, event_info);
245 } else { 244 } else {
246 embedder_web_contents->SystemDragEnded(); 245 embedder_web_contents->SystemDragEnded();
247 } 246 }
248 } 247 }
249 248
250 } // namespace content 249 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_child_frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698