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

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

Issue 23841002: Create a new RenderFrameHost per child frame when --site-per-process is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: notify observers regardless of flag Created 7 years, 3 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/render_view_host_manager.cc
diff --git a/content/browser/web_contents/render_view_host_manager.cc b/content/browser/web_contents/render_view_host_manager.cc
index 0d2041a48951ef321daa021b8d59bae10d69deab..eb8af334f58a6660c20584d09f0a06ff729b43e1 100644
--- a/content/browser/web_contents/render_view_host_manager.cc
+++ b/content/browser/web_contents/render_view_host_manager.cc
@@ -84,7 +84,9 @@ void RenderViewHostManager::Init(BrowserContext* browser_context,
render_view_host_ = static_cast<RenderViewHostImpl*>(
RenderViewHostFactory::Create(
site_instance, render_view_delegate_, render_widget_delegate_,
- routing_id, main_frame_routing_id, false, delegate_->IsHidden()));
+ routing_id, main_frame_routing_id, false,
+ delegate_->IsHidden()));
+ render_view_host_->AttachToFrameTree();
// Keep track of renderer processes as they start to shut down or are
// crashed/killed.
@@ -737,10 +739,12 @@ void RenderViewHostManager::CommitPending() {
bool focus_render_view = !will_focus_location_bar &&
render_view_host_->GetView() && render_view_host_->GetView()->HasFocus();
- // Swap in the pending view and make it active.
+ // Swap in the pending view and make it active. Also ensure the FrameTree
+ // stays in sync.
RenderViewHostImpl* old_render_view_host = render_view_host_;
render_view_host_ = pending_render_view_host_;
pending_render_view_host_ = NULL;
+ render_view_host_->AttachToFrameTree();
// The process will no longer try to exit, so we can decrement the count.
render_view_host_->GetProcess()->RemovePendingView();
« no previous file with comments | « content/browser/web_contents/interstitial_page_impl.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698