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

Unified Diff: ios/web_view/public/cwv_ui_delegate.h

Issue 2757603003: Add window open and close delegate methods to CWVUIDelegate. (Closed)
Patch Set: Respond to comments. 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_view/public/cwv_navigation_action.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/public/cwv_ui_delegate.h
diff --git a/ios/web_view/public/cwv_ui_delegate.h b/ios/web_view/public/cwv_ui_delegate.h
index 0e3a5b9724b58335774605069d31aaa8919d22e5..c4b51f6cbd85a3b676f08b2f2847b36b7b58efab 100644
--- a/ios/web_view/public/cwv_ui_delegate.h
+++ b/ios/web_view/public/cwv_ui_delegate.h
@@ -10,12 +10,25 @@
@class CWVHTMLElement;
@class CWVWebView;
+@class CWVWebViewConfiguration;
+@class CWVNavigationAction;
// UI delegate interface for a CWVWebView. Embedders can implement the
// functions in order to customize library behavior.
@protocol CWVUIDelegate<NSObject>
@optional
+// Instructs the delegate to create a new browsing window (f.e. in response to
+// window.open JavaScript call). Page will not open a window if this method
+// returns nil or is not implemented. This method can not return |webView|.
+- (CWVWebView*)webView:(CWVWebView*)webView
+ createWebViewWithConfiguration:(CWVWebViewConfiguration*)configuration
+ forNavigationAction:(CWVNavigationAction*)action;
+
+// Instructs the delegate to close |webView|. Called only for windows opened by
+// DOM.
+- (void)webViewDidClose:(CWVWebView*)webView;
+
// Instructs the delegate to present context menu in response to user’s long
// press gesture at |location| in |view| coordinate space. |element| is an HTML
// element which received the gesture.
« no previous file with comments | « ios/web_view/public/cwv_navigation_action.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698