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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 12252016: Prevented connecting drag drop events to a SwappedOut RenderViewHost in WebContentsViewGtk (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: A step back... Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0adbfda7f49c6de334aed7f18c67c9b42eb6a373..3c4ad3e3e2d30d12fb2aef724f5f0557d155adde 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3454,7 +3454,13 @@ NavigationEntry*
bool WebContentsImpl::CreateRenderViewForRenderManager(
RenderViewHost* render_view_host, int opener_route_id) {
// Can be NULL during tests.
- RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host);
+ RenderWidgetHostView* rwh_view = NULL;
+
+ // If the RenderViewHost is swapped out, we don't need to create a view for
Charlie Reis 2013/02/21 02:22:16 This is not true: we have to create a RenderView f
+ // it.
+ if (!static_cast<RenderViewHostImpl*>(render_view_host)->is_swapped_out()) {
+ rwh_view = view_->CreateViewForWidget(render_view_host);
+ }
// Now that the RenderView has been created, we need to tell it its size.
if (rwh_view)
@@ -3464,7 +3470,6 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
UpdateMaxPageIDIfNecessary(render_view_host);
int32 max_page_id =
GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance());
-
if (!static_cast<RenderViewHostImpl*>(
render_view_host)->CreateRenderView(string16(),
opener_route_id,
@@ -3480,7 +3485,6 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
render_widget_host->WasResized();
}
#endif
-
return true;
}
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698