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

Unified Diff: content/browser/renderer_host/render_view_host_impl.h

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: custom deleters rock. 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/renderer_host/render_view_host_impl.h
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index c4bfb7876d14af878dc9abc17755bf7c2dd1b6b6..228d288743a3f31d126fbd6217e9ca5483f35cdd 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -456,6 +456,13 @@ class CONTENT_EXPORT RenderViewHostImpl
bool empty_allowed,
GURL* url);
+ // Update the FrameTree with the new RenderFrameHost for the main frame.
+ // Called when the RenderViewHost is commited.
+ //
+ // TODO(ajwong): Remove once RenderViewHost no longer owns the main frame
+ // RenderFrameHost.
+ void AttachToFrameTree();
+
// NOTE: Do not add functions that just send an IPC message that are called in
// one or two places. Have the caller send the IPC message directly (unless
// the caller places are in different platforms, in which case it's better
@@ -581,25 +588,30 @@ class CONTENT_EXPORT RenderViewHostImpl
void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params);
#endif
+ // TODO(nasko): Remove this accessor once RenderFrameHost moves into the frame
+ // tree.
+ RenderFrameHostImpl* main_render_frame_host() const {
+ return main_render_frame_host_.get();
+ }
+
private:
friend class TestRenderViewHost;
FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost);
FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane);
- // TODO(nasko): Remove this accessor once RenderFrameHost moves into the frame
- // tree.
- RenderFrameHostImpl* main_render_frame_host() const;
-
// Sets whether this RenderViewHost is swapped out in favor of another,
// and clears any waiting state that is no longer relevant.
void SetSwappedOut(bool is_swapped_out);
bool CanAccessFilesOfPageState(const PageState& state) const;
- // This is an RenderFrameHost object associated with the top-level frame in
- // the page rendered by this RenderViewHost.
- // TODO(nasko): Remove this pointer once we have enough infrastructure to
- // move this to the top-level FrameTreeNode.
+ // All RenderViewHosts must have a RenderFrameHost for its main frame.
+ // Currently the RenderFrameHost is created in lock step on construction
+ // and a pointer to the main frame is given to the FrameTree node
Charlie Reis 2013/09/24 18:25:58 nit: FrameTreeNode
awong 2013/09/26 21:25:24 Done.
+ // when the RenderViewHost commit (see AttachToFrameTree()).
Charlie Reis 2013/09/24 18:25:58 nit: commits
awong 2013/09/26 21:25:24 Done.
+ //
+ // TODO(ajwong): Make this reference non-owning. The FrameTree should be
Charlie Reis 2013/09/24 18:25:58 nit: FrameTreeNode, right?
awong 2013/09/26 21:25:24 Fixed and also reworded slightly to clarify that w
+ // responsible for owning the main frame's RenderFrameHost.
scoped_ptr<RenderFrameHostImpl> main_render_frame_host_;
// Our delegate, which wants to know about changes in the RenderView.

Powered by Google App Engine
This is Rietveld 408576698