Chromium Code Reviews| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 | 105 |
| 106 // Assigns a new opener for this node and, if |opener| is non-null, registers | 106 // Assigns a new opener for this node and, if |opener| is non-null, registers |
| 107 // an observer that will clear this node's opener if |opener| is ever | 107 // an observer that will clear this node's opener if |opener| is ever |
| 108 // destroyed. | 108 // destroyed. |
| 109 void SetOpener(FrameTreeNode* opener); | 109 void SetOpener(FrameTreeNode* opener); |
| 110 | 110 |
| 111 FrameTreeNode* child_at(size_t index) const { | 111 FrameTreeNode* child_at(size_t index) const { |
| 112 return children_[index].get(); | 112 return children_[index].get(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 // Returns the URL of the last committed page in this frame. | |
| 115 const GURL& current_url() const { | 116 const GURL& current_url() const { |
| 116 return current_url_; | 117 return current_url_; |
| 117 } | 118 } |
| 118 | 119 |
| 119 // Sets the last committed URL for this frame and updates | 120 // Sets the last committed URL for this frame and updates |
| 120 // has_committed_real_load accordingly. | 121 // has_committed_real_load accordingly. |
| 121 void SetCurrentURL(const GURL& url); | 122 void SetCurrentURL(const GURL& url); |
| 122 | 123 |
| 123 // Returns true iff SetCurrentURL has been called with a non-blank URL. | 124 // Returns true iff SetCurrentURL has been called with a non-blank URL. |
| 124 bool has_committed_real_load() const { | 125 bool has_committed_real_load() const { |
| 125 return has_committed_real_load_; | 126 return has_committed_real_load_; |
| 126 } | 127 } |
| 127 | 128 |
| 129 // Returns the origin of the last committed page in this frame. | |
| 130 const url::Origin& current_origin() const { | |
|
alexmos
2015/11/20 18:07:36
Is it worth also simplifying tests that use "curre
Charlie Reis
2015/11/20 19:54:32
Sure, I'll do that in a followup CL.
| |
| 131 return replication_state_.origin; | |
| 132 } | |
| 133 | |
| 128 // Set the current origin and notify proxies about the update. | 134 // Set the current origin and notify proxies about the update. |
| 129 void SetCurrentOrigin(const url::Origin& origin); | 135 void SetCurrentOrigin(const url::Origin& origin); |
| 130 | 136 |
| 131 // Set the current name and notify proxies about the update. | 137 // Set the current name and notify proxies about the update. |
| 132 void SetFrameName(const std::string& name); | 138 void SetFrameName(const std::string& name); |
| 133 | 139 |
| 134 blink::WebSandboxFlags effective_sandbox_flags() { | 140 blink::WebSandboxFlags effective_sandbox_flags() { |
| 135 return effective_sandbox_flags_; | 141 return effective_sandbox_flags_; |
| 136 } | 142 } |
| 137 | 143 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 311 base::ObserverList<Observer> observers_; | 317 base::ObserverList<Observer> observers_; |
| 312 | 318 |
| 313 base::TimeTicks last_focus_time_; | 319 base::TimeTicks last_focus_time_; |
| 314 | 320 |
| 315 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 321 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 316 }; | 322 }; |
| 317 | 323 |
| 318 } // namespace content | 324 } // namespace content |
| 319 | 325 |
| 320 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 326 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |