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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 | 130 |
131 // Sets the last committed URL for this frame and updates | 131 // Sets the last committed URL for this frame and updates |
132 // has_committed_real_load accordingly. | 132 // has_committed_real_load accordingly. |
133 void SetCurrentURL(const GURL& url); | 133 void SetCurrentURL(const GURL& url); |
134 | 134 |
135 // Returns true iff SetCurrentURL has been called with a non-blank URL. | 135 // Returns true iff SetCurrentURL has been called with a non-blank URL. |
136 bool has_committed_real_load() const { | 136 bool has_committed_real_load() const { |
137 return has_committed_real_load_; | 137 return has_committed_real_load_; |
138 } | 138 } |
139 | 139 |
140 // Returns whether the frame's owner element in the parent frame is collapsed | |
141 // as per request by the client, i.e. it should not appear in the layout. | |
142 bool is_frame_owner_collapsed() const { return is_frame_owner_collapsed_; } | |
143 | |
144 // Sets whether to collapse, i.e. exclude from the layout, the frame's owner | |
145 // element in the parent frame. Not applicable to main frames, and will have | |
146 // no effect unless the child frame is embedded using an <iframe> element. | |
147 void SetFrameOwnerCollapsedState(bool collapsed); | |
148 | |
140 // Returns the origin of the last committed page in this frame. | 149 // Returns the origin of the last committed page in this frame. |
141 // WARNING: To get the last committed origin for a particular | 150 // WARNING: To get the last committed origin for a particular |
142 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, | 151 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, |
143 // which will behave correctly even when the RenderFrameHost is not the | 152 // which will behave correctly even when the RenderFrameHost is not the |
144 // current one for this frame (such as when it's pending deletion). | 153 // current one for this frame (such as when it's pending deletion). |
145 const url::Origin& current_origin() const { | 154 const url::Origin& current_origin() const { |
146 return replication_state_.origin; | 155 return replication_state_.origin; |
147 } | 156 } |
148 | 157 |
149 // Set the current origin and notify proxies about the update. | 158 // Set the current origin and notify proxies about the update. |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 // is disowned. | 348 // is disowned. |
340 std::unique_ptr<OpenerDestroyedObserver> opener_observer_; | 349 std::unique_ptr<OpenerDestroyedObserver> opener_observer_; |
341 | 350 |
342 // The immediate children of this specific frame. | 351 // The immediate children of this specific frame. |
343 std::vector<std::unique_ptr<FrameTreeNode>> children_; | 352 std::vector<std::unique_ptr<FrameTreeNode>> children_; |
344 | 353 |
345 // Whether this frame has committed any real load, replacing its initial | 354 // Whether this frame has committed any real load, replacing its initial |
346 // about:blank page. | 355 // about:blank page. |
347 bool has_committed_real_load_; | 356 bool has_committed_real_load_; |
348 | 357 |
358 // Whether the frame's owner element in the parent frame is collapsed, i.e. it | |
359 // does not appear in the layout. Always false for main frames, and has have | |
360 // no effect unless the child frame is embedded using an <iframe> element. | |
361 bool is_frame_owner_collapsed_; | |
nasko
2017/01/19 00:11:46
Why does the browser process need to know this?
engedy
2017/02/17 18:09:25
As discussed offline, this is required to avoid ne
| |
362 | |
349 // Track information that needs to be replicated to processes that have | 363 // Track information that needs to be replicated to processes that have |
350 // proxies for this frame. | 364 // proxies for this frame. |
351 FrameReplicationState replication_state_; | 365 FrameReplicationState replication_state_; |
352 | 366 |
353 // Track the pending sandbox flags for this frame. When a parent frame | 367 // Track the pending sandbox flags for this frame. When a parent frame |
354 // dynamically updates sandbox flags in the <iframe> element for a child | 368 // dynamically updates sandbox flags in the <iframe> element for a child |
355 // frame, these updated flags are stored here and are transferred into | 369 // frame, these updated flags are stored here and are transferred into |
356 // replication_state_.sandbox_flags when they take effect on the next frame | 370 // replication_state_.sandbox_flags when they take effect on the next frame |
357 // navigation. | 371 // navigation. |
358 blink::WebSandboxFlags pending_sandbox_flags_; | 372 blink::WebSandboxFlags pending_sandbox_flags_; |
(...skipping 23 matching lines...) Expand all Loading... | |
382 // browser process activities to this node (when possible). It is unrelated | 396 // browser process activities to this node (when possible). It is unrelated |
383 // to the core logic of FrameTreeNode. | 397 // to the core logic of FrameTreeNode. |
384 FrameTreeNodeBlameContext blame_context_; | 398 FrameTreeNodeBlameContext blame_context_; |
385 | 399 |
386 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 400 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
387 }; | 401 }; |
388 | 402 |
389 } // namespace content | 403 } // namespace content |
390 | 404 |
391 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 405 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
OLD | NEW |