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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/frame_tree_node.h
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index ac46de23c5737bedbf5e9fb7a2f4839ef1c1ab23..8c4c5f29344391148fc6bd5fa914781e2f8aef8d 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -147,6 +147,20 @@ class CONTENT_EXPORT FrameTreeNode {
return has_committed_real_load_;
}
+ // Returns whether the frame's owner element in the parent document is
+ // collapsed, that is, removed from the layout as if it did not exist, as per
+ // request by the embedder (of the content/ layer).
+ bool is_collapsed() const { return is_collapsed_; }
+
+ // Sets whether to collapse the frame's owner element in the parent document,
+ // that is, to remove it from the layout as if it did not exist, as per
+ // request by the embedder (of the content/ layer). Cannot be called for main
+ // frames.
+ //
+ // This only has an effect for <iframe> owner elements, and is a no-op when
+ // called on sub-frames hosted in <frame>, <object>, and <embed> elements.
+ void SetCollapsed(bool collapsed);
+
// Returns the origin of the last committed page in this frame.
// WARNING: To get the last committed origin for a particular
// RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead,
@@ -398,6 +412,9 @@ class CONTENT_EXPORT FrameTreeNode {
// about:blank page.
bool has_committed_real_load_;
+ // Whether the frame's owner element in the parent document is collapsed.
+ bool is_collapsed_;
+
// Track information that needs to be replicated to processes that have
// proxies for this frame.
FrameReplicationState replication_state_;

Powered by Google App Engine
This is Rietveld 408576698