| 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 #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 Loading... |
| 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 // Returns true iff SetCurrentURL has been called with a non-blank URL. |
| 119 bool has_committed_real_load() const { |
| 120 return has_committed_real_load_; |
| 116 } | 121 } |
| 117 | 122 |
| 118 // Set the current origin and notify proxies about the update. | 123 // Set the current origin and notify proxies about the update. |
| 119 void SetCurrentOrigin(const url::DeprecatedSerializedOrigin& origin); | 124 void SetCurrentOrigin(const url::DeprecatedSerializedOrigin& origin); |
| 120 | 125 |
| 121 // Set the current name and notify proxies about the update. | 126 // Set the current name and notify proxies about the update. |
| 122 void SetFrameName(const std::string& name); | 127 void SetFrameName(const std::string& name); |
| 123 | 128 |
| 124 blink::WebSandboxFlags effective_sandbox_flags() { | 129 blink::WebSandboxFlags effective_sandbox_flags() { |
| 125 return effective_sandbox_flags_; | 130 return effective_sandbox_flags_; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // An observer that clears this node's |opener_| if the opener is destroyed. | 239 // 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_| | 240 // 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_| | 241 // 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_| | 242 // changes or when this node is destroyed. It is also cleared if |opener_| |
| 238 // is disowned. | 243 // is disowned. |
| 239 scoped_ptr<OpenerDestroyedObserver> opener_observer_; | 244 scoped_ptr<OpenerDestroyedObserver> opener_observer_; |
| 240 | 245 |
| 241 // The immediate children of this specific frame. | 246 // The immediate children of this specific frame. |
| 242 ScopedVector<FrameTreeNode> children_; | 247 ScopedVector<FrameTreeNode> children_; |
| 243 | 248 |
| 244 // Track the current frame's last committed URL, so we can estimate the | 249 // Track the current frame's last committed URL. |
| 245 // process impact of out-of-process iframes. | 250 // TODO(creis): Consider storing a reference to the last committed |
| 246 // TODO(creis): Remove this when we can store subframe URLs in the | 251 // FrameNavigationEntry here once those are created in all modes. |
| 247 // NavigationController. | |
| 248 GURL current_url_; | 252 GURL current_url_; |
| 249 | 253 |
| 254 // Whether this frame has committed any real load, replacing its initial |
| 255 // about:blank page. |
| 256 bool has_committed_real_load_; |
| 257 |
| 250 // Track information that needs to be replicated to processes that have | 258 // Track information that needs to be replicated to processes that have |
| 251 // proxies for this frame. | 259 // proxies for this frame. |
| 252 FrameReplicationState replication_state_; | 260 FrameReplicationState replication_state_; |
| 253 | 261 |
| 254 // Track the effective sandbox flags for this frame. When a parent frame | 262 // 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 | 263 // dynamically updates sandbox flags for a child frame, the child's updated |
| 256 // sandbox flags are stored in replication_state_.sandbox_flags. However, the | 264 // sandbox flags are stored in replication_state_.sandbox_flags. However, the |
| 257 // update only takes effect on the next frame navigation, so the effective | 265 // update only takes effect on the next frame navigation, so the effective |
| 258 // sandbox flags are tracked separately here. When enforcing sandbox flags | 266 // sandbox flags are tracked separately here. When enforcing sandbox flags |
| 259 // directives in the browser process, |effective_sandbox_flags_| should be | 267 // directives in the browser process, |effective_sandbox_flags_| should be |
| (...skipping 11 matching lines...) Expand all Loading... |
| 271 | 279 |
| 272 // List of objects observing this FrameTreeNode. | 280 // List of objects observing this FrameTreeNode. |
| 273 base::ObserverList<Observer> observers_; | 281 base::ObserverList<Observer> observers_; |
| 274 | 282 |
| 275 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 283 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 276 }; | 284 }; |
| 277 | 285 |
| 278 } // namespace content | 286 } // namespace content |
| 279 | 287 |
| 280 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 288 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |