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

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

Issue 72233002: Move RenderViewHostManager from WebContents to FrameTreeNode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 7 years, 1 month 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
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree_node.h
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index 8bacc77629d9ec51b4fe161e27cf9db8ba8b7672..a110ff9aab557b4155a3781c7374748293dc4373 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+#include "content/browser/frame_host/render_view_host_manager.h"
#include "content/common/content_export.h"
#include "url/gurl.h"
@@ -27,11 +28,13 @@ class CONTENT_EXPORT FrameTreeNode {
public:
static const int64 kInvalidFrameId;
- FrameTreeNode(
- int64 frame_id,
- const std::string& name,
- Navigator* navigator,
- scoped_ptr<RenderFrameHostImpl> render_frame_host);
+ FrameTreeNode(Navigator* navigator,
+ RenderViewHostDelegate* render_view_delegate,
+ RenderWidgetHostDelegate* render_widget_delegate,
+ RenderViewHostManager::Delegate* manager_delegate,
+ int64 frame_id,
+ const std::string& name,
+ scoped_ptr<RenderFrameHostImpl> render_frame_host);
~FrameTreeNode();
@@ -48,6 +51,14 @@ class CONTENT_EXPORT FrameTreeNode {
// no longer owned by the RenderViewHostImpl.
void ResetForMainFrame(RenderFrameHostImpl* new_render_frame_host);
+ Navigator* navigator() {
+ return navigator_.get();
+ }
+
+ RenderViewHostManager* render_manager() {
+ return &render_manager_;
+ }
+
int64 frame_tree_node_id() const {
return frame_tree_node_id_;
}
@@ -86,14 +97,22 @@ class CONTENT_EXPORT FrameTreeNode {
return render_frame_host_;
}
- Navigator* navigator() {
- return navigator_.get();
- }
-
private:
// The next available browser-global FrameTreeNode ID.
static int64 next_frame_tree_node_id_;
+ // The Navigator object responsible for managing navigations at this node
+ // of the frame tree.
+ scoped_refptr<Navigator> navigator_;
+
+ // Manages creation and swapping of RenderViewHosts for this frame. This must
+ // be declared before |children_| so that it gets deleted after them. That's
+ // currently necessary so that RenderFrameHostImpl's destructor can call
+ // GetProcess.
+ // TODO(creis): This will become a RenderFrameHostManager, which eliminates
+ // the need for |render_frame_host_| below.
+ RenderViewHostManager render_manager_;
+
// A browser-global identifier for the frame in the page, which stays stable
// even if the frame does a cross-process navigation.
const int64 frame_tree_node_id_;
@@ -111,10 +130,6 @@ class CONTENT_EXPORT FrameTreeNode {
// The immediate children of this specific frame.
ScopedVector<FrameTreeNode> children_;
- // The Navigator object responsible for managing navigations at this node
- // of the frame tree.
- scoped_refptr<Navigator> navigator_;
-
// When ResetForMainFrame() is called, this is set to false and the
// |render_frame_host_| below is not deleted on destruction.
//
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698