Chromium Code Reviews| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 | 138 |
| 139 // Sets the last committed URL for this frame and updates | 139 // Sets the last committed URL for this frame and updates |
| 140 // has_committed_real_load accordingly. | 140 // has_committed_real_load accordingly. |
| 141 void SetCurrentURL(const GURL& url); | 141 void SetCurrentURL(const GURL& url); |
| 142 | 142 |
| 143 // Returns true iff SetCurrentURL has been called with a non-blank URL. | 143 // Returns true iff SetCurrentURL has been called with a non-blank URL. |
| 144 bool has_committed_real_load() const { | 144 bool has_committed_real_load() const { |
| 145 return has_committed_real_load_; | 145 return has_committed_real_load_; |
| 146 } | 146 } |
| 147 | 147 |
| 148 // Returns whether the frame's owner element in the embedder document is | |
|
nasko
2017/03/01 20:08:04
nit: s/embedder/parent/, it is a bit more web plat
engedy
2017/04/10 14:36:41
Done.
| |
| 149 // collapsed, that is, removed from the layout as if it did not exist, as per | |
| 150 // request by the client. | |
|
nasko
2017/03/01 20:08:04
What is "client" in this case? The content/ interf
engedy
2017/04/10 14:36:41
Tried to clarify.
| |
| 151 bool is_collapsed_by_client() const { return is_collapsed_by_client_; } | |
| 152 | |
| 153 // Sets whether to collapse the frame's owner element in the embedder | |
| 154 // document, that is, to remove it from the layout as if it did not exist, as | |
| 155 // per request by the client. Cannot be called for main frames. Only has an | |
| 156 // effect for <iframe> owner elements. | |
|
nasko
2017/03/01 20:08:04
Are there owner elements for things other than <if
engedy
2017/04/10 14:36:41
Done.
| |
| 157 void SetCollapsedByClient(bool collapsed); | |
| 158 | |
| 148 // Returns the origin of the last committed page in this frame. | 159 // Returns the origin of the last committed page in this frame. |
| 149 // WARNING: To get the last committed origin for a particular | 160 // WARNING: To get the last committed origin for a particular |
| 150 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, | 161 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, |
| 151 // which will behave correctly even when the RenderFrameHost is not the | 162 // which will behave correctly even when the RenderFrameHost is not the |
| 152 // current one for this frame (such as when it's pending deletion). | 163 // current one for this frame (such as when it's pending deletion). |
| 153 const url::Origin& current_origin() const { | 164 const url::Origin& current_origin() const { |
| 154 return replication_state_.origin; | 165 return replication_state_.origin; |
| 155 } | 166 } |
| 156 | 167 |
| 157 // Set the current origin and notify proxies about the update. | 168 // Set the current origin and notify proxies about the update. |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 356 // destroyed. | 367 // destroyed. |
| 357 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_; | 368 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_; |
| 358 | 369 |
| 359 // The immediate children of this specific frame. | 370 // The immediate children of this specific frame. |
| 360 std::vector<std::unique_ptr<FrameTreeNode>> children_; | 371 std::vector<std::unique_ptr<FrameTreeNode>> children_; |
| 361 | 372 |
| 362 // Whether this frame has committed any real load, replacing its initial | 373 // Whether this frame has committed any real load, replacing its initial |
| 363 // about:blank page. | 374 // about:blank page. |
| 364 bool has_committed_real_load_; | 375 bool has_committed_real_load_; |
| 365 | 376 |
| 377 // Whether the frame's owner element in the embedder document is collapsed, | |
| 378 // that is, removed from the layout as if it did not exist, as per request | |
| 379 // from the client. Always `false` for main frames. Only works for <iframe> | |
| 380 // owner elements. | |
|
nasko
2017/03/01 20:08:04
nit: This comment is almost identical to the other
engedy
2017/04/10 14:36:41
Actually, I made this one shorter.
| |
| 381 bool is_collapsed_by_client_; | |
| 382 | |
| 366 // Track information that needs to be replicated to processes that have | 383 // Track information that needs to be replicated to processes that have |
| 367 // proxies for this frame. | 384 // proxies for this frame. |
| 368 FrameReplicationState replication_state_; | 385 FrameReplicationState replication_state_; |
| 369 | 386 |
| 370 // Track the pending sandbox flags for this frame. When a parent frame | 387 // Track the pending sandbox flags for this frame. When a parent frame |
| 371 // dynamically updates sandbox flags in the <iframe> element for a child | 388 // dynamically updates sandbox flags in the <iframe> element for a child |
| 372 // frame, these updated flags are stored here and are transferred into | 389 // frame, these updated flags are stored here and are transferred into |
| 373 // replication_state_.sandbox_flags when they take effect on the next frame | 390 // replication_state_.sandbox_flags when they take effect on the next frame |
| 374 // navigation. | 391 // navigation. |
| 375 blink::WebSandboxFlags pending_sandbox_flags_; | 392 blink::WebSandboxFlags pending_sandbox_flags_; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 399 // browser process activities to this node (when possible). It is unrelated | 416 // browser process activities to this node (when possible). It is unrelated |
| 400 // to the core logic of FrameTreeNode. | 417 // to the core logic of FrameTreeNode. |
| 401 FrameTreeNodeBlameContext blame_context_; | 418 FrameTreeNodeBlameContext blame_context_; |
| 402 | 419 |
| 403 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 420 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 404 }; | 421 }; |
| 405 | 422 |
| 406 } // namespace content | 423 } // namespace content |
| 407 | 424 |
| 408 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 425 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |