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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 | 106 |
107 // Transfer any pending sandbox flags into |effective_sandbox_flags_|, and | 107 // Transfer any pending sandbox flags into |effective_sandbox_flags_|, and |
108 // return true if the sandbox flags were changed. | 108 // return true if the sandbox flags were changed. |
109 bool CommitPendingSandboxFlags(); | 109 bool CommitPendingSandboxFlags(); |
110 | 110 |
111 bool HasSameOrigin(const FrameTreeNode& node) const { | 111 bool HasSameOrigin(const FrameTreeNode& node) const { |
112 return replication_state_.origin.IsSameAs(node.replication_state_.origin); | 112 return replication_state_.origin.IsSameAs(node.replication_state_.origin); |
113 } | 113 } |
114 | 114 |
| 115 // Returns whether this node has any ancestor FrameTreeNode with a current |
| 116 // RenderFrameHost in |site_instance|. This is useful for determining if |
| 117 // messages from the SiteInstance's process have "ownership" over this frame. |
| 118 bool HasAncestorFrom(SiteInstance* site_instance) const; |
| 119 |
115 const FrameReplicationState& current_replication_state() const { | 120 const FrameReplicationState& current_replication_state() const { |
116 return replication_state_; | 121 return replication_state_; |
117 } | 122 } |
118 | 123 |
119 RenderFrameHostImpl* current_frame_host() const { | 124 RenderFrameHostImpl* current_frame_host() const { |
120 return render_manager_.current_frame_host(); | 125 return render_manager_.current_frame_host(); |
121 } | 126 } |
122 | 127 |
123 bool IsDescendantOf(FrameTreeNode* other) const; | 128 bool IsDescendantOf(FrameTreeNode* other) const; |
124 | 129 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // used. |effective_sandbox_flags_| is updated with any pending sandbox | 182 // used. |effective_sandbox_flags_| is updated with any pending sandbox |
178 // flags when a navigation for this frame commits. | 183 // flags when a navigation for this frame commits. |
179 SandboxFlags effective_sandbox_flags_; | 184 SandboxFlags effective_sandbox_flags_; |
180 | 185 |
181 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 186 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
182 }; | 187 }; |
183 | 188 |
184 } // namespace content | 189 } // namespace content |
185 | 190 |
186 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 191 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
OLD | NEW |