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

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

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: ... and without breaking stuff. Created 3 years, 8 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 // Sets the last committed URL for this frame and updates 140 // Sets the last committed URL for this frame and updates
141 // has_committed_real_load accordingly. 141 // has_committed_real_load accordingly.
142 void SetCurrentURL(const GURL& url); 142 void SetCurrentURL(const GURL& url);
143 143
144 // Returns true iff SetCurrentURL has been called with a non-blank URL. 144 // Returns true iff SetCurrentURL has been called with a non-blank URL.
145 bool has_committed_real_load() const { 145 bool has_committed_real_load() const {
146 return has_committed_real_load_; 146 return has_committed_real_load_;
147 } 147 }
148 148
149 // Returns whether the frame's owner element in the parent document is
150 // collapsed, that is, removed from the layout as if it did not exist, as per
151 // request by the embedder (of the content/ layer).
nasko 2017/04/20 15:53:40 nit: Does it make a difference that it was request
engedy 2017/04/28 13:43:58 I removed this remark from most places, but here I
152 bool is_collapsed() const { return is_collapsed_; }
153
154 // Sets whether to collapse the frame's owner element in the parent document,
155 // that is, to remove it from the layout as if it did not exist, as per
156 // request by the embedder (of the content/ layer). Cannot be called for main
157 // frames.
158 //
159 // This only has an effect for <iframe> owner elements, and is a no-op when
160 // called on sub-frames hosted in <frame>, <object>, and <embed> elements.
161 void SetCollapsed(bool collapsed);
162
149 // Returns the origin of the last committed page in this frame. 163 // Returns the origin of the last committed page in this frame.
150 // WARNING: To get the last committed origin for a particular 164 // WARNING: To get the last committed origin for a particular
151 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, 165 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead,
152 // which will behave correctly even when the RenderFrameHost is not the 166 // which will behave correctly even when the RenderFrameHost is not the
153 // current one for this frame (such as when it's pending deletion). 167 // current one for this frame (such as when it's pending deletion).
154 const url::Origin& current_origin() const { 168 const url::Origin& current_origin() const {
155 return replication_state_.origin; 169 return replication_state_.origin;
156 } 170 }
157 171
158 // Set the current origin and notify proxies about the update. 172 // Set the current origin and notify proxies about the update.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // destroyed. 375 // destroyed.
362 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_; 376 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_;
363 377
364 // The immediate children of this specific frame. 378 // The immediate children of this specific frame.
365 std::vector<std::unique_ptr<FrameTreeNode>> children_; 379 std::vector<std::unique_ptr<FrameTreeNode>> children_;
366 380
367 // Whether this frame has committed any real load, replacing its initial 381 // Whether this frame has committed any real load, replacing its initial
368 // about:blank page. 382 // about:blank page.
369 bool has_committed_real_load_; 383 bool has_committed_real_load_;
370 384
385 // Whether the frame's owner element in the parent document is collapsed.
386 bool is_collapsed_;
387
371 // Track information that needs to be replicated to processes that have 388 // Track information that needs to be replicated to processes that have
372 // proxies for this frame. 389 // proxies for this frame.
373 FrameReplicationState replication_state_; 390 FrameReplicationState replication_state_;
374 391
375 // Track the pending sandbox flags for this frame. When a parent frame 392 // Track the pending sandbox flags for this frame. When a parent frame
376 // dynamically updates sandbox flags in the <iframe> element for a child 393 // dynamically updates sandbox flags in the <iframe> element for a child
377 // frame, these updated flags are stored here and are transferred into 394 // frame, these updated flags are stored here and are transferred into
378 // replication_state_.sandbox_flags when they take effect on the next frame 395 // replication_state_.sandbox_flags when they take effect on the next frame
379 // navigation. 396 // navigation.
380 blink::WebSandboxFlags pending_sandbox_flags_; 397 blink::WebSandboxFlags pending_sandbox_flags_;
(...skipping 23 matching lines...) Expand all
404 // browser process activities to this node (when possible). It is unrelated 421 // browser process activities to this node (when possible). It is unrelated
405 // to the core logic of FrameTreeNode. 422 // to the core logic of FrameTreeNode.
406 FrameTreeNodeBlameContext blame_context_; 423 FrameTreeNodeBlameContext blame_context_;
407 424
408 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); 425 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
409 }; 426 };
410 427
411 } // namespace content 428 } // namespace content
412 429
413 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 430 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698