| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 FrameTreeNode* original_opener() const { return original_opener_; } | 117 FrameTreeNode* original_opener() const { return original_opener_; } |
| 118 | 118 |
| 119 // Assigns a new opener for this node and, if |opener| is non-null, registers | 119 // Assigns a new opener for this node and, if |opener| is non-null, registers |
| 120 // an observer that will clear this node's opener if |opener| is ever | 120 // an observer that will clear this node's opener if |opener| is ever |
| 121 // destroyed. | 121 // destroyed. |
| 122 void SetOpener(FrameTreeNode* opener); | 122 void SetOpener(FrameTreeNode* opener); |
| 123 | 123 |
| 124 // Assigns the initial opener for this node, and if |opener| is non-null, | 124 // Assigns the initial opener for this node, and if |opener| is non-null, |
| 125 // registers an observer that will clear this node's opener if |opener| is | 125 // registers an observer that will clear this node's opener if |opener| is |
| 126 // ever destroyed. | 126 // ever destroyed. The value set here is the root of the tree. |
| 127 // |
| 127 // It is not possible to change the opener once it was set. | 128 // It is not possible to change the opener once it was set. |
| 128 void SetOriginalOpener(FrameTreeNode* opener); | 129 void SetOriginalOpener(FrameTreeNode* opener); |
| 129 | 130 |
| 130 FrameTreeNode* child_at(size_t index) const { | 131 FrameTreeNode* child_at(size_t index) const { |
| 131 return children_[index].get(); | 132 return children_[index].get(); |
| 132 } | 133 } |
| 133 | 134 |
| 134 // Returns the URL of the last committed page in the current frame. | 135 // Returns the URL of the last committed page in the current frame. |
| 135 const GURL& current_url() const { | 136 const GURL& current_url() const { |
| 136 return current_frame_host()->last_committed_url(); | 137 return current_frame_host()->last_committed_url(); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 // browser process activities to this node (when possible). It is unrelated | 404 // browser process activities to this node (when possible). It is unrelated |
| 404 // to the core logic of FrameTreeNode. | 405 // to the core logic of FrameTreeNode. |
| 405 FrameTreeNodeBlameContext blame_context_; | 406 FrameTreeNodeBlameContext blame_context_; |
| 406 | 407 |
| 407 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 408 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 408 }; | 409 }; |
| 409 | 410 |
| 410 } // namespace content | 411 } // namespace content |
| 411 | 412 |
| 412 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 413 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |