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

Unified Diff: content/browser/frame_host/frame_tree_node.h

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Addressed comments from csharrison@. 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 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 b42347326f9ac38b0bd384c2a292e56b1abf4f12..fd372635d8850c2bda8f84c01ecdaecf0f9483c0 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,
@@ -394,6 +408,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