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/profiler/scoped_tracker.h" | 10 #include "base/profiler/scoped_tracker.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 current_url_ = GURL(); | 132 current_url_ = GURL(); |
133 | 133 |
134 // The children may not have been cleared if a cross-process navigation | 134 // The children may not have been cleared if a cross-process navigation |
135 // commits before the old process cleans everything up. Make sure the child | 135 // commits before the old process cleans everything up. Make sure the child |
136 // nodes get deleted before swapping to a new process. | 136 // nodes get deleted before swapping to a new process. |
137 ScopedVector<FrameTreeNode> old_children = children_.Pass(); | 137 ScopedVector<FrameTreeNode> old_children = children_.Pass(); |
138 old_children.clear(); // May notify observers. | 138 old_children.clear(); // May notify observers. |
139 } | 139 } |
140 | 140 |
141 void FrameTreeNode::SetCurrentOrigin(const url::Origin& origin) { | 141 void FrameTreeNode::SetCurrentOrigin(const url::Origin& origin) { |
142 if (!origin.IsSameAs(replication_state_.origin)) | 142 if (!origin.IsSameOriginWith(replication_state_.origin)) |
143 render_manager_.OnDidUpdateOrigin(origin); | 143 render_manager_.OnDidUpdateOrigin(origin); |
144 replication_state_.origin = origin; | 144 replication_state_.origin = origin; |
145 } | 145 } |
146 | 146 |
147 void FrameTreeNode::SetFrameName(const std::string& name) { | 147 void FrameTreeNode::SetFrameName(const std::string& name) { |
148 if (name != replication_state_.name) | 148 if (name != replication_state_.name) |
149 render_manager_.OnDidUpdateName(name); | 149 render_manager_.OnDidUpdateName(name); |
150 replication_state_.name = name; | 150 replication_state_.name = name; |
151 } | 151 } |
152 | 152 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 299 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
300 "465796 FrameTreeNode::DidStopLoading::End")); | 300 "465796 FrameTreeNode::DidStopLoading::End")); |
301 } | 301 } |
302 | 302 |
303 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { | 303 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { |
304 loading_progress_ = load_progress; | 304 loading_progress_ = load_progress; |
305 frame_tree_->UpdateLoadProgress(); | 305 frame_tree_->UpdateLoadProgress(); |
306 } | 306 } |
307 | 307 |
308 } // namespace content | 308 } // namespace content |
OLD | NEW |