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

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

Issue 270883003: Decouple RVH creation from CrossProcessFrameConnector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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 ea872a6957b5757bd88c23c708fecf8612e542aa..d21d63574ff3c57757dc372b5760bb7602b1f85b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3792,7 +3792,7 @@ NavigationEntry*
bool WebContentsImpl::CreateRenderViewForRenderManager(
RenderViewHost* render_view_host,
int opener_route_id,
- CrossProcessFrameConnector* frame_connector) {
+ bool for_subframe) {
TRACE_EVENT0("browser", "WebContentsImpl::CreateRenderViewForRenderManager");
// Can be NULL during tests.
RenderWidgetHostViewBase* rwh_view;
@@ -3800,11 +3800,11 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
// until RenderWidgetHost is attached to RenderFrameHost. We need to special
// case this because RWH is still a base class of RenderViewHost, and child
// frame RWHVs are unique in that they do not have their own WebContents.
- if (frame_connector) {
+ if (for_subframe) {
RenderWidgetHostViewChildFrame* rwh_view_child =
new RenderWidgetHostViewChildFrame(render_view_host);
- frame_connector->set_view(rwh_view_child);
rwh_view = rwh_view_child;
+ static_cast<RenderViewHostImpl*>(render_view_host)->SetView(rwh_view);
} else {
rwh_view = view_->CreateViewForWidget(render_view_host);
}

Powered by Google App Engine
This is Rietveld 408576698