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

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

Issue 1255573005: Create FrameNavigationEntries for the initial blank page in subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests and move has_committed_real_load Created 5 years, 5 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 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void SetOpener(FrameTreeNode* opener); 104 void SetOpener(FrameTreeNode* opener);
105 105
106 FrameTreeNode* child_at(size_t index) const { 106 FrameTreeNode* child_at(size_t index) const {
107 return children_[index]; 107 return children_[index];
108 } 108 }
109 109
110 const GURL& current_url() const { 110 const GURL& current_url() const {
111 return current_url_; 111 return current_url_;
112 } 112 }
113 113
114 void set_current_url(const GURL& url) { 114 // Sets the last committed URL for this frame and updates
115 current_url_ = url; 115 // has_committed_real_load accordingly.
116 void SetCurrentURL(const GURL& url);
117
118 bool has_committed_real_load() const {
Avi (use Gerrit) 2015/07/23 20:27:58 // Returns true iff SetCurrentURL has been called
Charlie Reis 2015/07/23 22:02:22 ...with a non-blank URL. Done.
119 return has_committed_real_load_;
116 } 120 }
117 121
118 // Set the current origin and notify proxies about the update. 122 // Set the current origin and notify proxies about the update.
119 void SetCurrentOrigin(const url::DeprecatedSerializedOrigin& origin); 123 void SetCurrentOrigin(const url::DeprecatedSerializedOrigin& origin);
120 124
121 // Set the current name and notify proxies about the update. 125 // Set the current name and notify proxies about the update.
122 void SetFrameName(const std::string& name); 126 void SetFrameName(const std::string& name);
123 127
124 blink::WebSandboxFlags effective_sandbox_flags() { 128 blink::WebSandboxFlags effective_sandbox_flags() {
125 return effective_sandbox_flags_; 129 return effective_sandbox_flags_;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // An observer that clears this node's |opener_| if the opener is destroyed. 238 // An observer that clears this node's |opener_| if the opener is destroyed.
235 // This observer is added to the |opener_|'s observer list when the |opener_| 239 // This observer is added to the |opener_|'s observer list when the |opener_|
236 // is set to a non-null node, and it is removed from that list when |opener_| 240 // is set to a non-null node, and it is removed from that list when |opener_|
237 // changes or when this node is destroyed. It is also cleared if |opener_| 241 // changes or when this node is destroyed. It is also cleared if |opener_|
238 // is disowned. 242 // is disowned.
239 scoped_ptr<OpenerDestroyedObserver> opener_observer_; 243 scoped_ptr<OpenerDestroyedObserver> opener_observer_;
240 244
241 // The immediate children of this specific frame. 245 // The immediate children of this specific frame.
242 ScopedVector<FrameTreeNode> children_; 246 ScopedVector<FrameTreeNode> children_;
243 247
244 // Track the current frame's last committed URL, so we can estimate the 248 // Track the current frame's last committed URL.
245 // process impact of out-of-process iframes. 249 // TODO(creis): Consider storing a reference to the last committed
246 // TODO(creis): Remove this when we can store subframe URLs in the 250 // FrameNavigationEntry here once those are created in all modes.
247 // NavigationController.
248 GURL current_url_; 251 GURL current_url_;
249 252
253 // Whether this frame has committed any real load, replacing its initial
254 // about:blank page.
255 bool has_committed_real_load_;
256
250 // Track information that needs to be replicated to processes that have 257 // Track information that needs to be replicated to processes that have
251 // proxies for this frame. 258 // proxies for this frame.
252 FrameReplicationState replication_state_; 259 FrameReplicationState replication_state_;
253 260
254 // Track the effective sandbox flags for this frame. When a parent frame 261 // Track the effective sandbox flags for this frame. When a parent frame
255 // dynamically updates sandbox flags for a child frame, the child's updated 262 // dynamically updates sandbox flags for a child frame, the child's updated
256 // sandbox flags are stored in replication_state_.sandbox_flags. However, the 263 // sandbox flags are stored in replication_state_.sandbox_flags. However, the
257 // update only takes effect on the next frame navigation, so the effective 264 // update only takes effect on the next frame navigation, so the effective
258 // sandbox flags are tracked separately here. When enforcing sandbox flags 265 // sandbox flags are tracked separately here. When enforcing sandbox flags
259 // directives in the browser process, |effective_sandbox_flags_| should be 266 // directives in the browser process, |effective_sandbox_flags_| should be
(...skipping 11 matching lines...) Expand all
271 278
272 // List of objects observing this FrameTreeNode. 279 // List of objects observing this FrameTreeNode.
273 base::ObserverList<Observer> observers_; 280 base::ObserverList<Observer> observers_;
274 281
275 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); 282 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
276 }; 283 };
277 284
278 } // namespace content 285 } // namespace content
279 286
280 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 287 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree_node.cc » ('j') | content/browser/frame_host/navigation_controller_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698