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 350d1ca02b5235e24b49fa9cf31d96bebfef7414..56c3e898d17f8d57bba0c3801d62e7ff4c9c5bd3 100644 |
--- a/content/browser/web_contents/web_contents_impl.h |
+++ b/content/browser/web_contents/web_contents_impl.h |
@@ -279,6 +279,8 @@ class CONTENT_EXPORT WebContentsImpl |
void WasHidden() override; |
bool NeedToFireBeforeUnload() override; |
void DispatchBeforeUnload(bool for_cross_site_transition) override; |
+ void AttachToEmbedderFrame(WebContents* embedder_web_contents, |
+ RenderFrameHost* embedder_frame) override; |
void Stop() override; |
WebContents* Clone() override; |
void ReloadFocusedFrame(bool ignore_cache) override; |
@@ -598,6 +600,7 @@ class CONTENT_EXPORT WebContentsImpl |
bool FocusLocationBarByDefault() override; |
void SetFocusToLocationBar(bool select_all) override; |
bool IsHidden() override; |
+ int64 GetEmbedderFrameTreeNodeID() override; |
// NotificationObserver ------------------------------------------------------ |
@@ -733,6 +736,25 @@ class CONTENT_EXPORT WebContentsImpl |
class DestructionObserver; |
+ // Represents a WebContents node in a tree of WebContents structure. |
+ // |
+ // Two WebContents with separate FrameTree can be connected by |
+ // parent-child relationship using this class. Note that their FrameTrees |
+ // still remain disjoint/separate. |
+ struct WebContentsTreeNode { |
+ public: |
+ WebContentsTreeNode(); |
+ ~WebContentsTreeNode(); |
+ |
+ void set_parent_web_contents(WebContentsImpl* parent_web_contents) { |
+ parent_web_contents_ = parent_web_contents; |
+ } |
+ WebContentsImpl* parent_web_contents() { return parent_web_contents_; } |
+ |
+ private: |
+ WebContentsImpl* parent_web_contents_; |
+ }; |
+ |
// See WebContents::Create for a description of these parameters. |
WebContentsImpl(BrowserContext* browser_context, |
WebContentsImpl* opener); |
@@ -1047,6 +1069,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" structure, then |
+ // this contain information about the structure. |
+ WebContentsTreeNode node_; |
+ |
// SavePackage, lazily created. |
scoped_refptr<SavePackage> save_package_; |