| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 render_frame_delegate, | 99 render_frame_delegate, |
| 100 render_widget_delegate, | 100 render_widget_delegate, |
| 101 manager_delegate), | 101 manager_delegate), |
| 102 frame_tree_node_id_(next_frame_tree_node_id_++), | 102 frame_tree_node_id_(next_frame_tree_node_id_++), |
| 103 parent_(parent), | 103 parent_(parent), |
| 104 opener_(nullptr), | 104 opener_(nullptr), |
| 105 opener_observer_(nullptr), | 105 opener_observer_(nullptr), |
| 106 original_opener_(nullptr), | 106 original_opener_(nullptr), |
| 107 original_opener_observer_(nullptr), | 107 original_opener_observer_(nullptr), |
| 108 has_committed_real_load_(false), | 108 has_committed_real_load_(false), |
| 109 is_frame_owner_collapsed_(false), |
| 109 replication_state_( | 110 replication_state_( |
| 110 scope, | 111 scope, |
| 111 name, | 112 name, |
| 112 unique_name, | 113 unique_name, |
| 113 blink::WebSandboxFlags::None, | 114 blink::WebSandboxFlags::None, |
| 114 false /* should enforce strict mixed content checking */, | 115 false /* should enforce strict mixed content checking */, |
| 115 false /* is a potentially trustworthy unique origin */, | 116 false /* is a potentially trustworthy unique origin */, |
| 116 false /* has received a user gesture */), | 117 false /* has received a user gesture */), |
| 117 pending_sandbox_flags_(blink::WebSandboxFlags::None), | 118 pending_sandbox_flags_(blink::WebSandboxFlags::None), |
| 118 frame_owner_properties_(frame_owner_properties), | 119 frame_owner_properties_(frame_owner_properties), |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 replication_state_.has_potentially_trustworthy_unique_origin != | 253 replication_state_.has_potentially_trustworthy_unique_origin != |
| 253 is_potentially_trustworthy_unique_origin) { | 254 is_potentially_trustworthy_unique_origin) { |
| 254 render_manager_.OnDidUpdateOrigin(origin, | 255 render_manager_.OnDidUpdateOrigin(origin, |
| 255 is_potentially_trustworthy_unique_origin); | 256 is_potentially_trustworthy_unique_origin); |
| 256 } | 257 } |
| 257 replication_state_.origin = origin; | 258 replication_state_.origin = origin; |
| 258 replication_state_.has_potentially_trustworthy_unique_origin = | 259 replication_state_.has_potentially_trustworthy_unique_origin = |
| 259 is_potentially_trustworthy_unique_origin; | 260 is_potentially_trustworthy_unique_origin; |
| 260 } | 261 } |
| 261 | 262 |
| 263 void FrameTreeNode::SetFrameOwnerCollapsedState(bool collapsed) { |
| 264 DCHECK(!IsMainFrame()); |
| 265 if (is_frame_owner_collapsed_ == collapsed) |
| 266 return; |
| 267 |
| 268 is_frame_owner_collapsed_ = collapsed; |
| 269 render_manager_.OnDidUpdateFrameOwnerCollapsedState(collapsed); |
| 270 } |
| 271 |
| 262 void FrameTreeNode::SetFrameName(const std::string& name, | 272 void FrameTreeNode::SetFrameName(const std::string& name, |
| 263 const std::string& unique_name) { | 273 const std::string& unique_name) { |
| 264 if (name == replication_state_.name) { | 274 if (name == replication_state_.name) { |
| 265 // |unique_name| shouldn't change unless |name| changes. | 275 // |unique_name| shouldn't change unless |name| changes. |
| 266 DCHECK_EQ(unique_name, replication_state_.unique_name); | 276 DCHECK_EQ(unique_name, replication_state_.unique_name); |
| 267 return; | 277 return; |
| 268 } | 278 } |
| 269 | 279 |
| 270 if (parent()) { | 280 if (parent()) { |
| 271 // Non-main frames should have a non-empty unique name. | 281 // Non-main frames should have a non-empty unique name. |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 563 } |
| 554 return parent_->child_at(i + relative_offset); | 564 return parent_->child_at(i + relative_offset); |
| 555 } | 565 } |
| 556 } | 566 } |
| 557 | 567 |
| 558 NOTREACHED() << "FrameTreeNode not found in its parent's children."; | 568 NOTREACHED() << "FrameTreeNode not found in its parent's children."; |
| 559 return nullptr; | 569 return nullptr; |
| 560 } | 570 } |
| 561 | 571 |
| 562 } // namespace content | 572 } // namespace content |
| OLD | NEW |