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

Side by Side Diff: ios/web_view/public/cwv_ui_delegate.h

Issue 2757603003: Add window open and close delegate methods to CWVUIDelegate. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_ 5 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_
6 #define IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_ 6 #define IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_
7 7
8 #import <CoreGraphics/CoreGraphics.h> 8 #import <CoreGraphics/CoreGraphics.h>
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
11 @class CWVHTMLElement; 11 @class CWVHTMLElement;
12 @class CWVWebView; 12 @class CWVWebView;
13 @class CWVWebViewConfiguration;
14 @class CWVNavigationAction;
13 15
14 // UI delegate interface for a CWVWebView. Embedders can implement the 16 // UI delegate interface for a CWVWebView. Embedders can implement the
15 // functions in order to customize library behavior. 17 // functions in order to customize library behavior.
16 @protocol CWVUIDelegate<NSObject> 18 @protocol CWVUIDelegate<NSObject>
17 19
18 @optional 20 @optional
21 // Instructs the delegate to create a new browsing window (f.e. in response to
22 // window.open JavaScript call).
Eugene But (OOO till 7-30) 2017/03/16 17:09:03 Add to the comments: "Page will not open a window
michaeldo 2017/03/16 18:24:28 Done.
23 - (CWVWebView*)webView:(CWVWebView*)webView
24 createWebViewWithConfiguration:(CWVWebViewConfiguration*)configuration
25 forNavigationAction:(CWVNavigationAction*)action;
26
27 // Instructs the delegate to close |webView|. Called only for windows opened by
28 // DOM.
29 - (void)webViewDidClose:(CWVWebView*)webView;
30
19 // Instructs the delegate to present context menu in response to user’s long 31 // Instructs the delegate to present context menu in response to user’s long
20 // press gesture at |location| in |view| coordinate space. |element| is an HTML 32 // press gesture at |location| in |view| coordinate space. |element| is an HTML
21 // element which received the gesture. 33 // element which received the gesture.
22 - (void)webView:(CWVWebView*)webView 34 - (void)webView:(CWVWebView*)webView
23 runContextMenuWithTitle:(NSString*)menuTitle 35 runContextMenuWithTitle:(NSString*)menuTitle
24 forHTMLElement:(CWVHTMLElement*)element 36 forHTMLElement:(CWVHTMLElement*)element
25 inView:(UIView*)view 37 inView:(UIView*)view
26 userGestureLocation:(CGPoint)location; 38 userGestureLocation:(CGPoint)location;
27 39
28 // Instructs the delegate to show UI in response to window.alert JavaScript 40 // Instructs the delegate to show UI in response to window.alert JavaScript
(...skipping 15 matching lines...) Expand all
44 - (void)webView:(CWVWebView*)webView 56 - (void)webView:(CWVWebView*)webView
45 runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt 57 runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt
46 defaultText:(NSString*)defaultText 58 defaultText:(NSString*)defaultText
47 pageURL:(NSURL*)URL 59 pageURL:(NSURL*)URL
48 completionHandler: 60 completionHandler:
49 (void (^)(NSString*))completionHandler; 61 (void (^)(NSString*))completionHandler;
50 62
51 @end 63 @end
52 64
53 #endif // IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_ 65 #endif // IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_
OLDNEW
« ios/web_view/public/cwv_navigation_action.h ('K') | « 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