Index: content/browser/web_contents/web_contents_impl.h |
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h |
index 51efdb457952f32d5e88c14b10c58954540d2a47..72ea38e6fddb6216ecc534a8e634a91fec8d7f12 100644 |
--- a/content/browser/web_contents/web_contents_impl.h |
+++ b/content/browser/web_contents/web_contents_impl.h |
@@ -283,6 +283,9 @@ class CONTENT_EXPORT WebContentsImpl |
void WasHidden() override; |
bool NeedToFireBeforeUnload() override; |
void DispatchBeforeUnload(bool for_cross_site_transition) override; |
+ void AttachToOuterWebContentsFrame( |
+ WebContents* outer_web_contents, |
+ RenderFrameHost* outer_contents_frame) override; |
void Stop() override; |
WebContents* Clone() override; |
void ReloadFocusedFrame(bool ignore_cache) override; |
@@ -598,6 +601,7 @@ class CONTENT_EXPORT WebContentsImpl |
bool FocusLocationBarByDefault() override; |
void SetFocusToLocationBar(bool select_all) override; |
bool IsHidden() override; |
+ int GetOuterDelegateFrameTreeNodeID() override; |
// NotificationObserver ------------------------------------------------------ |
@@ -729,6 +733,28 @@ class CONTENT_EXPORT WebContentsImpl |
class DestructionObserver; |
+ // Represents a WebContents node in a tree of WebContents structure. |
+ // |
+ // Two WebContents with separate FrameTrees can be connected by |
+ // outer/inner relationship using this class. Note that their FrameTrees |
+ // still remain disjoint. |
+ // The root is referred to as "outer WebContents" and the descendents are |
+ // referred to as "inner WebContents". |
+ struct WebContentsTreeNode { |
+ public: |
+ WebContentsTreeNode(); |
+ ~WebContentsTreeNode(); |
+ |
+ typedef std::set<WebContentsTreeNode*> ChildrenList; |
Charlie Reis
2015/06/02 18:19:14
set != list
Will we ever care about the order of
lazyboy
2015/06/02 20:15:21
Changed the typedef to ChildrenSet.
Charlie Reis
2015/06/02 23:55:43
No, a set is fine if we don't care about the order
|
+ |
+ void SetOuterWebContents(WebContentsImpl* outer_web_contents); |
+ WebContentsImpl* outer_web_contents() { return outer_web_contents_; } |
+ |
+ private: |
+ WebContentsImpl* outer_web_contents_; |
+ ChildrenList inner_web_contents_tree_nodes_; |
+ }; |
+ |
// See WebContents::Create for a description of these parameters. |
WebContentsImpl(BrowserContext* browser_context, |
WebContentsImpl* opener); |
@@ -1045,6 +1071,10 @@ class CONTENT_EXPORT WebContentsImpl |
// Manages the frame tree of the page and process swaps in each node. |
FrameTree frame_tree_; |
+ // If this WebContents is part of a "tree of WebContents", then this contains |
+ // information about the structure. |
+ WebContentsTreeNode node_; |
Charlie Reis
2015/06/02 18:19:14
Should this be a pointer instead of inline? The v
lazyboy
2015/06/02 20:15:21
Changed to scoped_ptr.
|
+ |
// SavePackage, lazily created. |
scoped_refptr<SavePackage> save_package_; |