Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: content/browser/frame_host/frame_tree_node.h

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Fix navigation transition type. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // destroyed. 405 // destroyed.
392 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_; 406 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_;
393 407
394 // The immediate children of this specific frame. 408 // The immediate children of this specific frame.
395 std::vector<std::unique_ptr<FrameTreeNode>> children_; 409 std::vector<std::unique_ptr<FrameTreeNode>> children_;
396 410
397 // Whether this frame has committed any real load, replacing its initial 411 // Whether this frame has committed any real load, replacing its initial
398 // about:blank page. 412 // about:blank page.
399 bool has_committed_real_load_; 413 bool has_committed_real_load_;
400 414
415 // Whether the frame's owner element in the parent document is collapsed.
416 bool is_collapsed_;
417
401 // Track information that needs to be replicated to processes that have 418 // Track information that needs to be replicated to processes that have
402 // proxies for this frame. 419 // proxies for this frame.
403 FrameReplicationState replication_state_; 420 FrameReplicationState replication_state_;
404 421
405 // Track the pending sandbox flags for this frame. When a parent frame 422 // Track the pending sandbox flags for this frame. When a parent frame
406 // dynamically updates sandbox flags in the <iframe> element for a child 423 // dynamically updates sandbox flags in the <iframe> element for a child
407 // frame, these updated flags are stored here and are transferred into 424 // frame, these updated flags are stored here and are transferred into
408 // replication_state_.sandbox_flags when they take effect on the next frame 425 // replication_state_.sandbox_flags when they take effect on the next frame
409 // navigation. 426 // navigation.
410 blink::WebSandboxFlags pending_sandbox_flags_; 427 blink::WebSandboxFlags pending_sandbox_flags_;
(...skipping 29 matching lines...) Expand all
440 // browser process activities to this node (when possible). It is unrelated 457 // browser process activities to this node (when possible). It is unrelated
441 // to the core logic of FrameTreeNode. 458 // to the core logic of FrameTreeNode.
442 FrameTreeNodeBlameContext blame_context_; 459 FrameTreeNodeBlameContext blame_context_;
443 460
444 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); 461 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
445 }; 462 };
446 463
447 } // namespace content 464 } // namespace content
448 465
449 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 466 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698