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

Unified Diff: content/browser/renderer_host/frame_tree.cc

Issue 26316005: Move out DidStartProvisionalLoad from WebContentsImpl into Navigator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial upload Created 7 years, 2 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/frame_tree.cc
diff --git a/content/browser/renderer_host/frame_tree.cc b/content/browser/renderer_host/frame_tree.cc
index 620da918c4b2fd1b54e897979f24951e0b033fca..5fcffdfea33a0817ec9d5f863a6a1dbf54957767 100644
--- a/content/browser/renderer_host/frame_tree.cc
+++ b/content/browser/renderer_host/frame_tree.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "content/browser/renderer_host/frame_tree_node.h"
+#include "content/browser/renderer_host/navigator.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
namespace content {
@@ -28,9 +29,15 @@ bool FrameTreeNodeForId(int64 frame_id, FrameTreeNode** out_node,
} // namespace
-FrameTree::FrameTree()
- : root_(new FrameTreeNode(FrameTreeNode::kInvalidFrameId, std::string(),
- scoped_ptr<RenderFrameHostImpl>())) {
+FrameTree::FrameTree() {}
+
+void FrameTree::Init(
+ NavigationControllerImpl* navigation_controller,
+ NavigatorObserver* navigator_observer) {
+ navigator_.reset(new Navigator(navigation_controller, navigator_observer));
+ root_.reset(new FrameTreeNode(navigator_.get(),
+ FrameTreeNode::kInvalidFrameId, std::string(),
+ scoped_ptr<RenderFrameHostImpl>()));
}
FrameTree::~FrameTree() {
@@ -131,7 +138,8 @@ scoped_ptr<FrameTreeNode> FrameTree::CreateNode(
new RenderFrameHostImpl(root_->render_frame_host()->render_view_host(),
this, render_frame_host_id, false));
- return make_scoped_ptr(new FrameTreeNode(frame_id, frame_name,
+ return make_scoped_ptr(new FrameTreeNode(navigator_.get(),
+ frame_id, frame_name,
render_frame_host.Pass()));
}

Powered by Google App Engine
This is Rietveld 408576698