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

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

Issue 2737943003: Moved window opening callback to WebStateDelegate. (Closed)
Patch Set: Rebased 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_delegate.h
diff --git a/ios/web/public/web_state/web_state_delegate.h b/ios/web/public/web_state/web_state_delegate.h
index 8eebecc4027ef0502a965f665f3b0b4396c8bf2a..01e189f6ddc7d26c6a5e26f172894586746b0b33 100644
--- a/ios/web/public/web_state/web_state_delegate.h
+++ b/ios/web/public/web_state/web_state_delegate.h
@@ -23,6 +23,16 @@ class WebStateDelegate {
public:
WebStateDelegate();
+ // Called when |source| wants to open a new window. |url| is the URL of
+ // the new window; |opener_url| is the URL of the page which requested a
+ // window to be open; |initiated_by_user| is true if action was caused by the
+ // user. |source| will not open a window if this method returns nil. This
+ // method can not return |source|.
+ virtual WebState* CreateNewWebState(WebState* source,
+ const GURL& url,
+ const GURL& opener_url,
+ bool initiated_by_user);
+
// Returns the WebState the URL is opened in, or nullptr if the URL wasn't
// opened immediately.
virtual WebState* OpenURLFromWebState(WebState*,
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | ios/web/public/web_state/web_state_delegate_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698