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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 // Sets the last committed URL for this frame and updates | 141 // Sets the last committed URL for this frame and updates |
142 // has_committed_real_load accordingly. | 142 // has_committed_real_load accordingly. |
143 void SetCurrentURL(const GURL& url); | 143 void SetCurrentURL(const GURL& url); |
144 | 144 |
145 // Returns true iff SetCurrentURL has been called with a non-blank URL. | 145 // Returns true iff SetCurrentURL has been called with a non-blank URL. |
146 bool has_committed_real_load() const { | 146 bool has_committed_real_load() const { |
147 return has_committed_real_load_; | 147 return has_committed_real_load_; |
148 } | 148 } |
149 | 149 |
| 150 // Returns whether the frame's owner element in the parent document is |
| 151 // collapsed, that is, removed from the layout as if it did not exist, as per |
| 152 // request by the embedder (of the content/ layer). |
| 153 bool is_collapsed() const { return is_collapsed_; } |
| 154 |
| 155 // Sets whether to collapse the frame's owner element in the parent document, |
| 156 // that is, to remove it from the layout as if it did not exist, as per |
| 157 // request by the embedder (of the content/ layer). Cannot be called for main |
| 158 // frames. |
| 159 // |
| 160 // This only has an effect for <iframe> owner elements, and is a no-op when |
| 161 // called on sub-frames hosted in <frame>, <object>, and <embed> elements. |
| 162 void SetCollapsed(bool collapsed); |
| 163 |
150 // Returns the origin of the last committed page in this frame. | 164 // Returns the origin of the last committed page in this frame. |
151 // WARNING: To get the last committed origin for a particular | 165 // WARNING: To get the last committed origin for a particular |
152 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, | 166 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, |
153 // which will behave correctly even when the RenderFrameHost is not the | 167 // which will behave correctly even when the RenderFrameHost is not the |
154 // current one for this frame (such as when it's pending deletion). | 168 // current one for this frame (such as when it's pending deletion). |
155 const url::Origin& current_origin() const { | 169 const url::Origin& current_origin() const { |
156 return replication_state_.origin; | 170 return replication_state_.origin; |
157 } | 171 } |
158 | 172 |
159 // Set the current origin and notify proxies about the update. | 173 // Set the current origin and notify proxies about the update. |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // destroyed. | 401 // destroyed. |
388 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_; | 402 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_; |
389 | 403 |
390 // The immediate children of this specific frame. | 404 // The immediate children of this specific frame. |
391 std::vector<std::unique_ptr<FrameTreeNode>> children_; | 405 std::vector<std::unique_ptr<FrameTreeNode>> children_; |
392 | 406 |
393 // Whether this frame has committed any real load, replacing its initial | 407 // Whether this frame has committed any real load, replacing its initial |
394 // about:blank page. | 408 // about:blank page. |
395 bool has_committed_real_load_; | 409 bool has_committed_real_load_; |
396 | 410 |
| 411 // Whether the frame's owner element in the parent document is collapsed. |
| 412 bool is_collapsed_; |
| 413 |
397 // Track information that needs to be replicated to processes that have | 414 // Track information that needs to be replicated to processes that have |
398 // proxies for this frame. | 415 // proxies for this frame. |
399 FrameReplicationState replication_state_; | 416 FrameReplicationState replication_state_; |
400 | 417 |
401 // Track the pending sandbox flags for this frame. When a parent frame | 418 // Track the pending sandbox flags for this frame. When a parent frame |
402 // dynamically updates sandbox flags in the <iframe> element for a child | 419 // dynamically updates sandbox flags in the <iframe> element for a child |
403 // frame, these updated flags are stored here and are transferred into | 420 // frame, these updated flags are stored here and are transferred into |
404 // replication_state_.sandbox_flags when they take effect on the next frame | 421 // replication_state_.sandbox_flags when they take effect on the next frame |
405 // navigation. | 422 // navigation. |
406 blink::WebSandboxFlags pending_sandbox_flags_; | 423 blink::WebSandboxFlags pending_sandbox_flags_; |
(...skipping 29 matching lines...) Expand all Loading... |
436 // browser process activities to this node (when possible). It is unrelated | 453 // browser process activities to this node (when possible). It is unrelated |
437 // to the core logic of FrameTreeNode. | 454 // to the core logic of FrameTreeNode. |
438 FrameTreeNodeBlameContext blame_context_; | 455 FrameTreeNodeBlameContext blame_context_; |
439 | 456 |
440 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 457 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
441 }; | 458 }; |
442 | 459 |
443 } // namespace content | 460 } // namespace content |
444 | 461 |
445 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 462 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
OLD | NEW |