| 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 daf4a71255d6b8a9c6f30493364f25644dd18620..4a0db77650e2671ddbad1a3bd49d12d14e9fa7cd 100644
|
| --- a/content/browser/frame_host/frame_tree_node.cc
|
| +++ b/content/browser/frame_host/frame_tree_node.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/command_line.h"
|
| #include "base/stl_util.h"
|
| #include "content/browser/frame_host/frame_tree.h"
|
| +#include "content/browser/frame_host/navigation_request.h"
|
| #include "content/browser/frame_host/navigator.h"
|
| #include "content/browser/frame_host/render_frame_host_impl.h"
|
| #include "content/browser/renderer_host/render_view_host_impl.h"
|
| @@ -71,10 +72,6 @@ FrameTreeNode::~FrameTreeNode() {
|
| frame_tree_->FrameRemoved(this);
|
|
|
| g_frame_tree_node_id_map.Get().erase(frame_tree_node_id_);
|
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableBrowserSideNavigation)) {
|
| - navigator_->CancelNavigation(this);
|
| - }
|
| }
|
|
|
| bool FrameTreeNode::IsMainFrame() const {
|
| @@ -174,4 +171,27 @@ bool FrameTreeNode::CommitPendingSandboxFlags() {
|
| return did_change_flags;
|
| }
|
|
|
| +void FrameTreeNode::SetNavigationRequest(
|
| + scoped_ptr<NavigationRequest> navigation_request) {
|
| + CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableBrowserSideNavigation));
|
| + ResetNavigationRequest(false);
|
| + // TODO(clamy): perform the StartLoading logic here.
|
| + navigation_request_ = navigation_request.Pass();
|
| +}
|
| +
|
| +void FrameTreeNode::ResetNavigationRequest(bool is_commit) {
|
| + CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableBrowserSideNavigation));
|
| + // Upon commit the current NavigationRequest will be reset. There should be no
|
| + // cleanup performed since the navigation is still ongoing. If the reset
|
| + // corresponds to a cancelation, the RenderFrameHostManager should clean up
|
| + // any speculative RenderFrameHost it created for the navigation.
|
| + if (navigation_request_ && !is_commit) {
|
| + // TODO(clamy): perform the StopLoading logic.
|
| + render_manager_.CleanUpNavigation();
|
| + }
|
| + navigation_request_.reset();
|
| +}
|
| +
|
| } // namespace content
|
|
|