Chromium Code Reviews| 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..da50265bf5ac55f198abd82c4a93fdb789737cda 100644 |
| --- a/content/browser/frame_host/frame_tree_node.cc |
| +++ b/content/browser/frame_host/frame_tree_node.cc |
| @@ -71,10 +71,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 +170,25 @@ 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)); |
| + // If there is an ongoing navigation, clean up any state that could have been |
| + // created in the RenderFrameHostManager. |
| + if (navigation_request_ && !is_commit) { |
| + // TODO(clamy): perform the StopLoading logic. |
|
nasko
2015/04/15 20:36:03
Why does it matter whether this is a commit or not
clamy
2015/04/16 12:12:30
On commit we reset the navigation request because
|
| + render_manager_.CleanUpNavigation(); |
| + } |
| + navigation_request_.reset(); |
| +} |
| + |
| } // namespace content |