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

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

Issue 2679513002: Track the original opener of a webcontents so we can rely on it for popups (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents.h
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index a5e25357162ed23c75c10f613567c16cf8d84e25..041c883265f83169a4157774a9645367162bcda7 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -632,12 +632,23 @@ class WebContents : public PageNavigator,
// to see what it should do.
virtual bool FocusLocationBarByDefault() = 0;
- // Does this have an opener associated with it?
+ // Does this have an opener (corresponding to window.opener in JavaScript)
+ // associated with it?
virtual bool HasOpener() const = 0;
// Returns the opener if HasOpener() is true, or nullptr otherwise.
virtual WebContents* GetOpener() const = 0;
+ // Returns true if this WebContents was opened by another WebContents, even
+ // if the opener was suppressed. In contrast to HasOpener/GetOpener, the
+ // original opener doesn't reflect window.opener which can be suppressed or
+ // updated.
+ virtual bool HasOriginalOpener() const = 0;
+
+ // Returns the original opener if HasOriginalOpener() is true, or nullptr
+ // otherwise.
+ virtual WebContents* GetOriginalOpener() const = 0;
+
typedef base::Callback<void(
int, /* id */
int, /* HTTP status code */
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698