OLD | NEW |
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 #if defined(CWV_IMPLEMENTATION) |
| 12 #include "ios/web_view/public/cwv_export.h" |
| 13 #else |
| 14 #include <ChromeWebView/cwv_export.h> |
| 15 #endif |
| 16 |
11 @class CWVHTMLElement; | 17 @class CWVHTMLElement; |
12 @class CWVWebView; | 18 @class CWVWebView; |
13 @class CWVWebViewConfiguration; | 19 @class CWVWebViewConfiguration; |
14 @class CWVNavigationAction; | 20 @class CWVNavigationAction; |
15 | 21 |
16 // UI delegate interface for a CWVWebView. Embedders can implement the | 22 // UI delegate interface for a CWVWebView. Embedders can implement the |
17 // functions in order to customize library behavior. | 23 // functions in order to customize library behavior. |
18 @protocol CWVUIDelegate<NSObject> | 24 CWV_EXPORT @protocol CWVUIDelegate<NSObject> |
19 | 25 |
20 @optional | 26 @optional |
21 // Instructs the delegate to create a new browsing window (f.e. in response to | 27 // Instructs the delegate to create a new browsing window (f.e. in response to |
22 // window.open JavaScript call). Page will not open a window if this method | 28 // window.open JavaScript call). Page will not open a window if this method |
23 // returns nil or is not implemented. This method can not return |webView|. | 29 // returns nil or is not implemented. This method can not return |webView|. |
24 - (CWVWebView*)webView:(CWVWebView*)webView | 30 - (CWVWebView*)webView:(CWVWebView*)webView |
25 createWebViewWithConfiguration:(CWVWebViewConfiguration*)configuration | 31 createWebViewWithConfiguration:(CWVWebViewConfiguration*)configuration |
26 forNavigationAction:(CWVNavigationAction*)action; | 32 forNavigationAction:(CWVNavigationAction*)action; |
27 | 33 |
28 // Instructs the delegate to close |webView|. Called only for windows opened by | 34 // Instructs the delegate to close |webView|. Called only for windows opened by |
(...skipping 28 matching lines...) Expand all Loading... |
57 - (void)webView:(CWVWebView*)webView | 63 - (void)webView:(CWVWebView*)webView |
58 runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt | 64 runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt |
59 defaultText:(NSString*)defaultText | 65 defaultText:(NSString*)defaultText |
60 pageURL:(NSURL*)URL | 66 pageURL:(NSURL*)URL |
61 completionHandler: | 67 completionHandler: |
62 (void (^)(NSString*))completionHandler; | 68 (void (^)(NSString*))completionHandler; |
63 | 69 |
64 @end | 70 @end |
65 | 71 |
66 #endif // IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_ | 72 #endif // IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_ |
OLD | NEW |