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

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

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Rebase. Created 3 years, 10 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 parent frame is collapsed
149 // as per request by the client, i.e. it should not appear in the layout.
150 bool is_frame_owner_collapsed() const { return is_frame_owner_collapsed_; }
151
152 // Sets whether to collapse, i.e. exclude from the layout, the frame's owner
153 // element in the parent frame. Not applicable to main frames, and will have
154 // no effect unless the child frame is embedded using an <iframe> element.
155 void SetFrameOwnerCollapsedState(bool collapsed);
156
148 // Returns the origin of the last committed page in this frame. 157 // Returns the origin of the last committed page in this frame.
149 // WARNING: To get the last committed origin for a particular 158 // WARNING: To get the last committed origin for a particular
150 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, 159 // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead,
151 // which will behave correctly even when the RenderFrameHost is not the 160 // which will behave correctly even when the RenderFrameHost is not the
152 // current one for this frame (such as when it's pending deletion). 161 // current one for this frame (such as when it's pending deletion).
153 const url::Origin& current_origin() const { 162 const url::Origin& current_origin() const {
154 return replication_state_.origin; 163 return replication_state_.origin;
155 } 164 }
156 165
157 // Set the current origin and notify proxies about the update. 166 // Set the current origin and notify proxies about the update.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // destroyed. 365 // destroyed.
357 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_; 366 std::unique_ptr<OpenerDestroyedObserver> original_opener_observer_;
358 367
359 // The immediate children of this specific frame. 368 // The immediate children of this specific frame.
360 std::vector<std::unique_ptr<FrameTreeNode>> children_; 369 std::vector<std::unique_ptr<FrameTreeNode>> children_;
361 370
362 // Whether this frame has committed any real load, replacing its initial 371 // Whether this frame has committed any real load, replacing its initial
363 // about:blank page. 372 // about:blank page.
364 bool has_committed_real_load_; 373 bool has_committed_real_load_;
365 374
375 // Whether the frame's owner element in the parent frame is collapsed, i.e. it
376 // does not appear in the layout. Always false for main frames, and has have
377 // no effect unless the child frame is embedded using an <iframe> element.
378 bool is_frame_owner_collapsed_;
379
366 // Track information that needs to be replicated to processes that have 380 // Track information that needs to be replicated to processes that have
367 // proxies for this frame. 381 // proxies for this frame.
368 FrameReplicationState replication_state_; 382 FrameReplicationState replication_state_;
369 383
370 // Track the pending sandbox flags for this frame. When a parent frame 384 // Track the pending sandbox flags for this frame. When a parent frame
371 // dynamically updates sandbox flags in the <iframe> element for a child 385 // dynamically updates sandbox flags in the <iframe> element for a child
372 // frame, these updated flags are stored here and are transferred into 386 // frame, these updated flags are stored here and are transferred into
373 // replication_state_.sandbox_flags when they take effect on the next frame 387 // replication_state_.sandbox_flags when they take effect on the next frame
374 // navigation. 388 // navigation.
375 blink::WebSandboxFlags pending_sandbox_flags_; 389 blink::WebSandboxFlags pending_sandbox_flags_;
(...skipping 23 matching lines...) Expand all
399 // browser process activities to this node (when possible). It is unrelated 413 // browser process activities to this node (when possible). It is unrelated
400 // to the core logic of FrameTreeNode. 414 // to the core logic of FrameTreeNode.
401 FrameTreeNodeBlameContext blame_context_; 415 FrameTreeNodeBlameContext blame_context_;
402 416
403 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); 417 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
404 }; 418 };
405 419
406 } // namespace content 420 } // namespace content
407 421
408 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 422 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698