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/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 if ((*iter) == child) | 65 if ((*iter) == child) |
66 break; | 66 break; |
67 } | 67 } |
68 | 68 |
69 if (iter != children_.end()) { | 69 if (iter != children_.end()) { |
70 (*iter)->set_parent(NULL); | 70 (*iter)->set_parent(NULL); |
71 children_.erase(iter); | 71 children_.erase(iter); |
72 } | 72 } |
73 } | 73 } |
74 | 74 |
75 void FrameTreeNode::ResetForMainFrameSwap() { | 75 void FrameTreeNode::ResetForNewProcess() { |
76 frame_id_ = kInvalidFrameId; | 76 frame_id_ = kInvalidFrameId; |
77 current_url_ = GURL(); | 77 current_url_ = GURL(); |
78 | 78 |
79 // The children may not have been cleared if a cross-process navigation | 79 // The children may not have been cleared if a cross-process navigation |
80 // commits before the old process cleans everything up. Make sure the child | 80 // commits before the old process cleans everything up. Make sure the child |
81 // nodes get deleted. | 81 // nodes get deleted before swapping to a new process. |
82 children_.clear(); | 82 children_.clear(); |
83 } | 83 } |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
OLD | NEW |