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

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

Issue 1086283002: Track frame openers in FrameTreeNodes instead of WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Charlie's comments Created 5 years, 6 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 8a462275214340595e908e42450b430fe9fe7d3d..1160a2ffc6f2966ff2930ebb1501a29cbf55f375 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -105,16 +105,12 @@ class CONTENT_EXPORT WebContentsImpl
static WebContentsImpl* CreateWithOpener(
const WebContents::CreateParams& params,
- WebContentsImpl* opener);
+ FrameTreeNode* opener);
static std::vector<WebContentsImpl*> GetAllWebContents();
static WebContentsImpl* FromFrameTreeNode(FrameTreeNode* frame_tree_node);
- // Returns the opener WebContentsImpl, if any. This can be set to null if the
- // opener is closed or the page clears its window.opener.
- WebContentsImpl* opener() const { return opener_; }
-
// Creates a swapped out RenderView. This is used by the browser plugin to
// create a swapped out RenderView in the embedder render process for the
// guest, to expose the guest's window object to the embedder.
@@ -400,7 +396,6 @@ class CONTENT_EXPORT WebContentsImpl
void DidAccessInitialDocument() override;
void DidChangeName(RenderFrameHost* render_frame_host,
const std::string& name) override;
- void DidDisownOpener(RenderFrameHost* render_frame_host) override;
void DocumentOnLoadCompleted(RenderFrameHost* render_frame_host) override;
void UpdateTitle(RenderFrameHost* render_frame_host,
int32 page_id,
@@ -730,8 +725,7 @@ class CONTENT_EXPORT WebContentsImpl
class DestructionObserver;
// See WebContents::Create for a description of these parameters.
- WebContentsImpl(BrowserContext* browser_context,
- WebContentsImpl* opener);
+ WebContentsImpl(BrowserContext* browser_context);
// Add and remove observers for page navigation notifications. The order in
// which notifications are sent to observers is undefined. Clients must be
@@ -739,7 +733,7 @@ class CONTENT_EXPORT WebContentsImpl
void AddObserver(WebContentsObserver* observer);
void RemoveObserver(WebContentsObserver* observer);
- // Clears this tab's opener if it has been closed.
+ // Clears a pending contents that has been closed before being shown.
void OnWebContentsDestroyed(WebContentsImpl* web_contents);
// Creates and adds to the map a destruction observer watching |web_contents|.
@@ -862,6 +856,10 @@ class CONTENT_EXPORT WebContentsImpl
// up at the next animation step if the throbber is going.
void SetNotWaitingForResponse() { waiting_for_response_ = false; }
+ // Returns the opener WebContentsImpl, if any. This can be null if the opener
+ // is closed or the page clears its window.opener.
+ WebContentsImpl* GetOpenerWebContents() const;
Charlie Reis 2015/06/09 04:38:38 Oh, for some reason I thought we were returning a
alexmos 2015/06/09 20:13:05 Done.
+
// Navigation helpers --------------------------------------------------------
//
// These functions are helpers for Navigate() and DidNavigate().
@@ -1017,10 +1015,6 @@ class CONTENT_EXPORT WebContentsImpl
// the observer list then.
base::ObserverList<WebContentsObserver> observers_;
- // The tab that opened this tab, if any. Will be set to null if the opener
- // is closed.
- WebContentsImpl* opener_;
-
// True if this tab was opened by another tab. This is not unset if the opener
// is closed.
bool created_with_opener_;

Powered by Google App Engine
This is Rietveld 408576698