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 25 matching lines...) Expand all Loading... | |
36 parent_(NULL), | 36 parent_(NULL), |
37 replication_state_(name), | 37 replication_state_(name), |
38 is_loading_(false) { | 38 is_loading_(false) { |
39 } | 39 } |
40 | 40 |
41 FrameTreeNode::~FrameTreeNode() { | 41 FrameTreeNode::~FrameTreeNode() { |
42 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 42 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
43 switches::kEnableBrowserSideNavigation)) { | 43 switches::kEnableBrowserSideNavigation)) { |
44 navigator_->CancelNavigation(this); | 44 navigator_->CancelNavigation(this); |
45 } | 45 } |
46 frame_tree_->RemoveNodeFromMap(frame_tree_node_id_); | |
Charlie Reis
2015/02/12 17:12:43
Why not frame_tree->RemoveFrame(this)? I'm guessi
nasko
2015/02/12 23:21:08
Done.
| |
46 } | 47 } |
47 | 48 |
48 bool FrameTreeNode::IsMainFrame() const { | 49 bool FrameTreeNode::IsMainFrame() const { |
49 return frame_tree_->root() == this; | 50 return frame_tree_->root() == this; |
50 } | 51 } |
51 | 52 |
52 void FrameTreeNode::AddChild(scoped_ptr<FrameTreeNode> child, | 53 void FrameTreeNode::AddChild(scoped_ptr<FrameTreeNode> child, |
53 int process_id, | 54 int process_id, |
54 int frame_routing_id) { | 55 int frame_routing_id) { |
55 // Child frame must always be created in the same process as the parent. | 56 // Child frame must always be created in the same process as the parent. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 | 102 |
102 for (FrameTreeNode* node = parent(); node; node = node->parent()) { | 103 for (FrameTreeNode* node = parent(); node; node = node->parent()) { |
103 if (node == other) | 104 if (node == other) |
104 return true; | 105 return true; |
105 } | 106 } |
106 | 107 |
107 return false; | 108 return false; |
108 } | 109 } |
109 | 110 |
110 } // namespace content | 111 } // namespace content |
OLD | NEW |