Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: content/browser/frame_host/frame_tree_node.cc

Issue 1098763003: Send origin updates to frame proxies when a frame navigates to new origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
132 // commits before the old process cleans everything up. Make sure the child 132 // commits before the old process cleans everything up. Make sure the child
133 // nodes get deleted before swapping to a new process. 133 // nodes get deleted before swapping to a new process.
134 ScopedVector<FrameTreeNode> old_children = children_.Pass(); 134 ScopedVector<FrameTreeNode> old_children = children_.Pass();
135 old_children.clear(); // May notify observers. 135 old_children.clear(); // May notify observers.
136 } 136 }
137 137
138 void FrameTreeNode::SetFrameName(const std::string& name) { 138 void FrameTreeNode::SetFrameName(const std::string& name) {
139 replication_state_.name = name; 139 replication_state_.name = name;
140 140
141 // Notify this frame's proxies about the updated name. 141 // Notify this frame's proxies about the updated name.
142 render_manager_.OnDidUpdateName(name); 142 render_manager_.OnDidUpdateName(name);
Charlie Reis 2015/04/21 19:10:30 Should this have a similar "only notify if there's
alexmos 2015/04/22 23:15:29 Done.
143 } 143 }
144 144
145 bool FrameTreeNode::IsDescendantOf(FrameTreeNode* other) const { 145 bool FrameTreeNode::IsDescendantOf(FrameTreeNode* other) const {
146 if (!other || !other->child_count()) 146 if (!other || !other->child_count())
147 return false; 147 return false;
148 148
149 for (FrameTreeNode* node = parent(); node; node = node->parent()) { 149 for (FrameTreeNode* node = parent(); node; node = node->parent()) {
150 if (node == other) 150 if (node == other)
151 return true; 151 return true;
152 } 152 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 tracked_objects::ScopedTracker tracking_profile4( 256 tracked_objects::ScopedTracker tracking_profile4(
257 FROM_HERE_WITH_EXPLICIT_FUNCTION( 257 FROM_HERE_WITH_EXPLICIT_FUNCTION(
258 "465796 FrameTreeNode::DidStopLoading::End")); 258 "465796 FrameTreeNode::DidStopLoading::End"));
259 } 259 }
260 260
261 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { 261 void FrameTreeNode::DidChangeLoadProgress(double load_progress) {
262 loading_progress_ = load_progress; 262 loading_progress_ = load_progress;
263 frame_tree_->UpdateLoadProgress(); 263 frame_tree_->UpdateLoadProgress();
264 } 264 }
265 265
266 void FrameTreeNode::SetCurrentOrigin(const url::Origin& origin) {
Charlie Reis 2015/04/21 19:10:30 nit: Same order as .h file (before SetFrameName).
alexmos 2015/04/22 23:15:29 Done.
267 if (!origin.IsSameAs(replication_state_.origin))
268 render_manager_.OnDidUpdateOrigin(origin);
269 replication_state_.origin = origin;
270 }
271
266 } // namespace content 272 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698