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

Unified Diff: ios/web/public/web_state/web_state.h

Issue 2755823002: Moved |openedByDOM| to WebState's CreateParams and public interface. (Closed)
Patch Set: BVC session controller cleanup Created 3 years, 9 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: ios/web/public/web_state/web_state.h
diff --git a/ios/web/public/web_state/web_state.h b/ios/web/public/web_state/web_state.h
index c54cbad34544e7e05d76704662209acf42d30efc..1e65c1c707aa6c58868261b70111b3f8c1fe4f95 100644
--- a/ios/web/public/web_state/web_state.h
+++ b/ios/web/public/web_state/web_state.h
@@ -57,7 +57,11 @@ class WebState : public base::SupportsUserData {
explicit CreateParams(web::BrowserState* browser_state);
~CreateParams();
+ // The corresponding BrowserState for the new WebState.
web::BrowserState* browser_state;
+
+ // Whether the WebState is created as the result of a window.open
+ bool opened_by_dom;
Eugene But (OOO till 7-30) 2017/03/16 15:31:19 Content has this boolean, which actually better re
kkhorimoto 2017/03/17 23:04:49 Done.
};
// Parameters for the OpenURL() method.
@@ -230,6 +234,10 @@ class WebState : public base::SupportsUserData {
// Returns Mojo interface registry for this WebState.
virtual service_manager::InterfaceRegistry* GetMojoInterfaceRegistry() = 0;
+ // Returns whether this WebState was created via a call to window.open or by
+ // clicking a link with a blank targer.
+ virtual bool IsOpenedByDOM() const = 0;
Eugene But (OOO till 7-30) 2017/03/16 15:31:19 Is this the same as content's HasOpener() ?
kkhorimoto 2017/03/17 23:04:49 Yes, it looks like it. I've updated the naming.
+
protected:
friend class WebStateObserver;
friend class WebStatePolicyDecider;

Powered by Google App Engine
This is Rietveld 408576698