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

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

Issue 2755823002: Moved |openedByDOM| to WebState's CreateParams and public interface. (Closed)
Patch Set: . 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
« no previous file with comments | « ios/web/public/test/web_test_with_web_state.mm ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5010d435b604af0f80bef362f2d8c4d64ebc18d1..662a48e2bb37f1df657d000f1a6092c6f3533cd3 100644
--- a/ios/web/public/web_state/web_state.h
+++ b/ios/web/public/web_state/web_state.h
@@ -57,7 +57,13 @@ 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 or by
+ // clicking a link with a blank targer. Used to determin whether the
+ // WebState is allowed to be closed via window.close().
+ bool created_with_opener;
};
// Parameters for the OpenURL() method.
@@ -231,6 +237,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 with an opener. See
+ // CreateParams::created_with_opener for more details.
+ virtual bool HasOpener() const = 0;
+
protected:
friend class WebStateObserver;
friend class WebStatePolicyDecider;
« no previous file with comments | « ios/web/public/test/web_test_with_web_state.mm ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698