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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: address all comments from Nasko and Charlie, minus is_loading Created 5 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/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 d95b2aca43ea3ee4bb8d5f0776d6e5ff56aaf106..ad678234a4d84eaf810143592271017afe3370c6 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -277,6 +277,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;
@@ -592,6 +595,7 @@ class CONTENT_EXPORT WebContentsImpl
bool FocusLocationBarByDefault() override;
void SetFocusToLocationBar(bool select_all) override;
bool IsHidden() override;
+ int GetOuterDelegateFrameTreeNodeID() override;
// NotificationObserver ------------------------------------------------------
@@ -723,6 +727,26 @@ 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();
+
+ void SetOuterWebContents(WebContentsImpl* outer_web_contents);
+ WebContentsImpl* outer_web_contents() { return outer_web_contents_; }
+
+ private:
+ WebContentsImpl* outer_web_contents_;
+ std::set<WebContentsTreeNode*> inner_web_contents_tree_nodes_;
nasko 2015/05/28 22:13:46 Why does the outer WebContents need to know about
lazyboy 2015/05/29 00:02:24 The outer WebContents(TreeNode) may be destroyed b
+ };
+
// See WebContents::Create for a description of these parameters.
WebContentsImpl(BrowserContext* browser_context,
WebContentsImpl* opener);
@@ -1037,6 +1061,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_;
+
// SavePackage, lazily created.
scoped_refptr<SavePackage> save_package_;

Powered by Google App Engine
This is Rietveld 408576698