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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 881683002: Remove indirection for SiteInstance and RenderProcessHost from RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 054b039fe8e6613d741c9402e046c0aefe493167..9cd29eb59ff0b660f23d9bb58be77dbaa8332e14 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -127,6 +127,9 @@ RenderFrameHostImpl::RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
int flags)
: render_view_host_(render_view_host),
delegate_(delegate),
+ site_instance_(
+ static_cast<SiteInstanceImpl*>(render_view_host->GetSiteInstance())),
Charlie Reis 2015/01/27 02:09:04 Let's pass the SiteInstance as a parameter rather
nasko 2015/01/27 22:30:34 Done.
+ process_(render_view_host->GetSiteInstance()->GetProcess()),
cross_process_frame_connector_(NULL),
render_frame_proxy_host_(NULL),
frame_tree_(frame_tree),
@@ -198,13 +201,11 @@ int RenderFrameHostImpl::GetRoutingID() {
}
SiteInstanceImpl* RenderFrameHostImpl::GetSiteInstance() {
- return render_view_host_->GetSiteInstance();
+ return site_instance_.get();
}
RenderProcessHost* RenderFrameHostImpl::GetProcess() {
- // TODO(nasko): This should return its own process, once we have working
- // cross-process navigation for subframes.
- return render_view_host_->GetProcess();
+ return process_;
}
RenderFrameHost* RenderFrameHostImpl::GetParent() {

Powered by Google App Engine
This is Rietveld 408576698