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 #include "content/browser/frame_host/frame_tree_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 return current_frame_host->loading_progress(); | 162 return current_frame_host->loading_progress(); |
163 } | 163 } |
164 | 164 |
165 bool FrameTreeNode::CommitPendingSandboxFlags() { | 165 bool FrameTreeNode::CommitPendingSandboxFlags() { |
166 bool did_change_flags = | 166 bool did_change_flags = |
167 effective_sandbox_flags_ != replication_state_.sandbox_flags; | 167 effective_sandbox_flags_ != replication_state_.sandbox_flags; |
168 effective_sandbox_flags_ = replication_state_.sandbox_flags; | 168 effective_sandbox_flags_ = replication_state_.sandbox_flags; |
169 return did_change_flags; | 169 return did_change_flags; |
170 } | 170 } |
171 | 171 |
| 172 bool FrameTreeNode::HasAncestorFrom(SiteInstance* site_instance) const { |
| 173 FrameTreeNode* parent_node = parent(); |
| 174 while (parent_node) { |
| 175 if (parent_node->current_frame_host()->GetSiteInstance() == site_instance) |
| 176 return true; |
| 177 parent_node = parent_node->parent(); |
| 178 } |
| 179 return false; |
| 180 } |
| 181 |
172 } // namespace content | 182 } // namespace content |
OLD | NEW |