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

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

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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_node.h ('k') | content/browser/frame_host/frame_tree_unittest.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.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 9bed9f699ecc57edde996cde2dcb18f3c7b96ed2..0a09765dd0d41ec548ed966eb6c22c83ce4954df 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -8,25 +8,32 @@
#include "base/stl_util.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "content/browser/renderer_host/render_view_host_impl.h"
namespace content {
-const int64 FrameTreeNode::kInvalidFrameId = -1;
-
-FrameTreeNode::FrameTreeNode(int64 frame_id, const std::string& name,
- scoped_ptr<RenderFrameHostImpl> render_frame_host)
- : frame_id_(frame_id),
+FrameTreeNode::FrameTreeNode(int64 frame_tree_node_id,
+ const std::string& name,
+ RenderViewHostDelegate* render_view_delegate,
+ RenderWidgetHostDelegate* render_widget_delegate,
+ RenderViewHostManager::Delegate* manager_delegate)
+ : frame_tree_node_id_(frame_tree_node_id),
frame_name_(name),
- owns_render_frame_host_(true),
- render_frame_host_(render_frame_host.release()) {
+ render_manager_(render_view_delegate,
+ render_widget_delegate,
+ manager_delegate) {
}
FrameTreeNode::~FrameTreeNode() {
- if (owns_render_frame_host_)
- delete render_frame_host_;
}
void FrameTreeNode::AddChild(scoped_ptr<FrameTreeNode> child) {
+ // TODO(creis): Find a sane place to put this.
+ child->render_manager()->Init(
+ render_manager_.current_host()->GetSiteInstance()->GetBrowserContext(),
+ render_manager_.current_host()->GetSiteInstance(),
+ render_manager_.current_host()->GetRoutingID(),
+ MSG_ROUTING_NONE);
children_.push_back(child.release());
}
@@ -34,7 +41,7 @@ void FrameTreeNode::RemoveChild(int64 child_id) {
std::vector<FrameTreeNode*>::iterator iter;
for (iter = children_.begin(); iter != children_.end(); ++iter) {
- if ((*iter)->frame_id() == child_id)
+ if ((*iter)->frame_tree_node_id() == child_id)
break;
}
@@ -42,7 +49,8 @@ void FrameTreeNode::RemoveChild(int64 child_id) {
children_.erase(iter);
}
-void FrameTreeNode::ResetForMainFrame(
+// TODO(creis): Do we need to change the frame ID and URL after a navigation?
+/*void FrameTreeNode::ResetForMainFrame(
RenderFrameHostImpl* new_render_frame_host) {
DCHECK_EQ(0UL, children_.size());
@@ -52,6 +60,6 @@ void FrameTreeNode::ResetForMainFrame(
children_.clear();
render_frame_host_ = new_render_frame_host;
-}
+}*/
} // namespace content
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/frame_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698