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