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

Unified Diff: content/browser/web_contents/interstitial_page_impl.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/interstitial_page_impl.cc
diff --git a/content/browser/web_contents/interstitial_page_impl.cc b/content/browser/web_contents/interstitial_page_impl.cc
index c12d01c37d7ec42b31b8b908b5a0147e21642cab..2198b149f2d69862afd5fd05eed04bb5955a2d73 100644
--- a/content/browser/web_contents/interstitial_page_impl.cc
+++ b/content/browser/web_contents/interstitial_page_impl.cc
@@ -16,6 +16,7 @@
#include "content/browser/dom_storage/session_storage_namespace_impl.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
+#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/site_instance_impl.h"
#include "content/browser/web_contents/navigation_controller_impl.h"
@@ -219,6 +220,7 @@ void InterstitialPageImpl::Show() {
DCHECK(!render_view_host_);
render_view_host_ = static_cast<RenderViewHostImpl*>(CreateRenderViewHost());
+ render_view_host_->AttachToFrameTree();
CreateWebContentsView();
std::string data_url = "data:text/html;charset=utf-8," +
@@ -270,6 +272,7 @@ void InterstitialPageImpl::Hide() {
weak_ptr_factory_.GetWeakPtr(),
render_view_host_));
render_view_host_ = NULL;
+ frame_tree_.SwapMainFrame(NULL);
web_contents_->DetachInterstitialPage();
// Let's revert to the original title if necessary.
NavigationEntry* entry = web_contents_->GetController().GetActiveEntry();
@@ -497,14 +500,14 @@ RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() {
session_storage_namespace_ =
new SessionStorageNamespaceImpl(dom_storage_context);
- RenderViewHostImpl* render_view_host =
- new RenderViewHostImpl(site_instance.get(),
- this,
- this,
- MSG_ROUTING_NONE,
- MSG_ROUTING_NONE,
- false,
- false);
+ RenderViewHost* render_view_host =
+ RenderViewHostFactory::Create(site_instance.get(),
+ this,
+ this,
+ MSG_ROUTING_NONE,
+ MSG_ROUTING_NONE,
+ false,
+ false);
web_contents_->RenderViewForInterstitialPageCreated(render_view_host);
return render_view_host;
}
@@ -710,6 +713,10 @@ SessionStorageNamespace* InterstitialPageImpl::GetSessionStorageNamespace(
return session_storage_namespace_.get();
}
+FrameTree* InterstitialPageImpl::GetFrameTree() {
+ return &frame_tree_;
+}
+
void InterstitialPageImpl::Disable() {
enabled_ = false;
}
« no previous file with comments | « content/browser/web_contents/interstitial_page_impl.h ('k') | content/browser/web_contents/render_view_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698