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

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

Issue 881683002: Remove indirection for SiteInstance and RenderProcessHost from RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Charlie's review 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.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index c9193a3080131997b6b1f299a898d078efba9ae2..68e955a0fcac4b3f155c6e207b84ba202a6ceb75 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -417,7 +417,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
// TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
// should be the abstraction needed here, but we need RenderViewHost to pass
// into WebContentsObserver::FrameDetached for now.
- RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
+ RenderFrameHostImpl(SiteInstance* site_instance,
+ RenderViewHostImpl* render_view_host,
RenderFrameHostDelegate* delegate,
RenderWidgetHostDelegate* rwh_delegate,
FrameTree* frame_tree,
@@ -535,6 +536,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
RenderFrameHostDelegate* delegate_;
+ // The SiteInstance associated with this RenderFrameHost. All content drawn
+ // in this RenderFrameHost is part of this SiteInstance. Cannot change over
+ // time.
+ scoped_refptr<SiteInstanceImpl> site_instance_;
+
+ // The renderer process this RenderFrameHost is associated with. It is
+ // equivalent to the result of site_instance_->GetProcess(), but that
+ // method has the side effect of creating the process if it doesn't exist.
+ // Cache a pointer to avoid unnecessary process creation.
+ RenderProcessHost* process_;
+
// |cross_process_frame_connector_| passes messages from an out-of-process
// child frame to the parent process for compositing.
//
« no previous file with comments | « content/browser/frame_host/render_frame_host_factory.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698