| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ | 4 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ |
| 5 #define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ | 5 #define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ |
| 6 | 6 |
| 7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 #if defined(CWV_IMPLEMENTATION) |
| 10 #include "ios/web_view/public/cwv_export.h" |
| 11 #else |
| 12 #include <ChromeWebView/cwv_export.h> |
| 13 #endif |
| 14 |
| 9 @class CWVWebViewConfiguration; | 15 @class CWVWebViewConfiguration; |
| 10 @protocol CWVUIDelegate; | 16 @protocol CWVUIDelegate; |
| 11 @protocol CWVTranslateDelegate; | 17 @protocol CWVTranslateDelegate; |
| 12 @protocol CWVNavigationDelegate; | 18 @protocol CWVNavigationDelegate; |
| 13 | 19 |
| 14 // A web view component (like WKWebView) which uses iOS Chromium's web view | 20 // A web view component (like WKWebView) which uses iOS Chromium's web view |
| 15 // implementation. | 21 // implementation. |
| 16 // | 22 // |
| 17 // In addition to WKWebView features, it allows Translate, Find In Page, | 23 // In addition to WKWebView features, it allows Translate, Find In Page, |
| 18 // Customizable Context Menus, and maybe more. | 24 // Customizable Context Menus, and maybe more. |
| 19 // | 25 // |
| 20 // Concrete instances can be created through CWV. | 26 // Concrete instances can be created through CWV. |
| 27 CWV_EXPORT |
| 21 @interface CWVWebView : UIView | 28 @interface CWVWebView : UIView |
| 22 | 29 |
| 23 // This web view's navigation delegate. | 30 // This web view's navigation delegate. |
| 24 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate; | 31 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate; |
| 25 | 32 |
| 26 // This web view's UI delegate | 33 // This web view's UI delegate |
| 27 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate; | 34 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate; |
| 28 | 35 |
| 29 // A delegate for the translation feature. | 36 // A delegate for the translation feature. |
| 30 @property(nonatomic, weak) id<CWVTranslateDelegate> translationDelegate; | 37 @property(nonatomic, weak) id<CWVTranslateDelegate> translationDelegate; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 - (void)loadRequest:(NSURLRequest*)request; | 80 - (void)loadRequest:(NSURLRequest*)request; |
| 74 | 81 |
| 75 // Evaluates a JavaScript string. | 82 // Evaluates a JavaScript string. |
| 76 // The completion handler is invoked when script evaluation completes. | 83 // The completion handler is invoked when script evaluation completes. |
| 77 - (void)evaluateJavaScript:(NSString*)javaScriptString | 84 - (void)evaluateJavaScript:(NSString*)javaScriptString |
| 78 completionHandler:(void (^)(id, NSError*))completionHandler; | 85 completionHandler:(void (^)(id, NSError*))completionHandler; |
| 79 | 86 |
| 80 @end | 87 @end |
| 81 | 88 |
| 82 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ | 89 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ |
| OLD | NEW |