OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/frame_host/frame_tree_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 std::pair<FrameTreeNodeIDMap::iterator, bool> result = | 64 std::pair<FrameTreeNodeIDMap::iterator, bool> result = |
65 g_frame_tree_node_id_map.Get().insert( | 65 g_frame_tree_node_id_map.Get().insert( |
66 std::make_pair(frame_tree_node_id_, this)); | 66 std::make_pair(frame_tree_node_id_, this)); |
67 CHECK(result.second); | 67 CHECK(result.second); |
68 } | 68 } |
69 | 69 |
70 FrameTreeNode::~FrameTreeNode() { | 70 FrameTreeNode::~FrameTreeNode() { |
71 frame_tree_->FrameRemoved(this); | 71 frame_tree_->FrameRemoved(this); |
72 | 72 |
73 g_frame_tree_node_id_map.Get().erase(frame_tree_node_id_); | 73 g_frame_tree_node_id_map.Get().erase(frame_tree_node_id_); |
74 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
75 switches::kEnableBrowserSideNavigation)) { | |
76 navigator_->CancelNavigation(this); | |
77 } | |
carlosk
2015/04/08 09:01:48
N::CancelNavigation -> RFHM::CleanUpNavigation ->
clamy
2015/04/08 11:29:11
I think this needs to remain in place otherwise th
carlosk
2015/04/08 16:05:39
Acknowledged.
| |
78 } | 74 } |
79 | 75 |
80 bool FrameTreeNode::IsMainFrame() const { | 76 bool FrameTreeNode::IsMainFrame() const { |
81 return frame_tree_->root() == this; | 77 return frame_tree_->root() == this; |
82 } | 78 } |
83 | 79 |
84 void FrameTreeNode::AddChild(scoped_ptr<FrameTreeNode> child, | 80 void FrameTreeNode::AddChild(scoped_ptr<FrameTreeNode> child, |
85 int process_id, | 81 int process_id, |
86 int frame_routing_id) { | 82 int frame_routing_id) { |
87 // Child frame must always be created in the same process as the parent. | 83 // Child frame must always be created in the same process as the parent. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 } | 164 } |
169 | 165 |
170 bool FrameTreeNode::CommitPendingSandboxFlags() { | 166 bool FrameTreeNode::CommitPendingSandboxFlags() { |
171 bool did_change_flags = | 167 bool did_change_flags = |
172 effective_sandbox_flags_ != replication_state_.sandbox_flags; | 168 effective_sandbox_flags_ != replication_state_.sandbox_flags; |
173 effective_sandbox_flags_ = replication_state_.sandbox_flags; | 169 effective_sandbox_flags_ = replication_state_.sandbox_flags; |
174 return did_change_flags; | 170 return did_change_flags; |
175 } | 171 } |
176 | 172 |
177 } // namespace content | 173 } // namespace content |
OLD | NEW |