| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 FrameTreeNode* original_opener() const { return original_opener_; } | 118 FrameTreeNode* original_opener() const { return original_opener_; } |
| 119 | 119 |
| 120 // Assigns a new opener for this node and, if |opener| is non-null, registers | 120 // Assigns a new opener for this node and, if |opener| is non-null, registers |
| 121 // an observer that will clear this node's opener if |opener| is ever | 121 // an observer that will clear this node's opener if |opener| is ever |
| 122 // destroyed. | 122 // destroyed. |
| 123 void SetOpener(FrameTreeNode* opener); | 123 void SetOpener(FrameTreeNode* opener); |
| 124 | 124 |
| 125 // Assigns the initial opener for this node, and if |opener| is non-null, | 125 // Assigns the initial opener for this node, and if |opener| is non-null, |
| 126 // registers an observer that will clear this node's opener if |opener| is | 126 // registers an observer that will clear this node's opener if |opener| is |
| 127 // ever destroyed. | 127 // ever destroyed. The value set here is the root of the tree. |
| 128 // |
| 128 // It is not possible to change the opener once it was set. | 129 // It is not possible to change the opener once it was set. |
| 129 void SetOriginalOpener(FrameTreeNode* opener); | 130 void SetOriginalOpener(FrameTreeNode* opener); |
| 130 | 131 |
| 131 FrameTreeNode* child_at(size_t index) const { | 132 FrameTreeNode* child_at(size_t index) const { |
| 132 return children_[index].get(); | 133 return children_[index].get(); |
| 133 } | 134 } |
| 134 | 135 |
| 135 // Returns the URL of the last committed page in the current frame. | 136 // Returns the URL of the last committed page in the current frame. |
| 136 const GURL& current_url() const { | 137 const GURL& current_url() const { |
| 137 return current_frame_host()->last_committed_url(); | 138 return current_frame_host()->last_committed_url(); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 407 |
| 407 // A set of Content-Security-Policies to enforce on the browser-side. | 408 // A set of Content-Security-Policies to enforce on the browser-side. |
| 408 std::vector<ContentSecurityPolicy> csp_policies_; | 409 std::vector<ContentSecurityPolicy> csp_policies_; |
| 409 | 410 |
| 410 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 411 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 411 }; | 412 }; |
| 412 | 413 |
| 413 } // namespace content | 414 } // namespace content |
| 414 | 415 |
| 415 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 416 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |