| 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 // TODO(crbug.com/704946): Make framework style include work everywhere and |
| 10 // remove this #if. |
| 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 |
| 9 @class CWVWebViewConfiguration; | 17 @class CWVWebViewConfiguration; |
| 10 @protocol CWVUIDelegate; | 18 @protocol CWVUIDelegate; |
| 11 @protocol CWVTranslateDelegate; | 19 @protocol CWVTranslateDelegate; |
| 12 @protocol CWVNavigationDelegate; | 20 @protocol CWVNavigationDelegate; |
| 13 | 21 |
| 14 // A web view component (like WKWebView) which uses iOS Chromium's web view | 22 // A web view component (like WKWebView) which uses iOS Chromium's web view |
| 15 // implementation. | 23 // implementation. |
| 16 // | 24 // |
| 17 // In addition to WKWebView features, it allows Translate, Find In Page, | 25 // In addition to WKWebView features, it allows Translate, Find In Page, |
| 18 // Customizable Context Menus, and maybe more. | 26 // Customizable Context Menus, and maybe more. |
| 19 // | 27 // |
| 20 // Concrete instances can be created through CWV. | 28 // Concrete instances can be created through CWV. |
| 29 CWV_EXPORT |
| 21 @interface CWVWebView : UIView | 30 @interface CWVWebView : UIView |
| 22 | 31 |
| 23 // The configuration of the web view. | 32 // The configuration of the web view. |
| 24 @property(nonatomic, readonly, copy) CWVWebViewConfiguration* configuration; | 33 @property(nonatomic, readonly, copy) CWVWebViewConfiguration* configuration; |
| 25 | 34 |
| 26 // This web view's navigation delegate. | 35 // This web view's navigation delegate. |
| 27 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate; | 36 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate; |
| 28 | 37 |
| 29 // This web view's UI delegate | 38 // This web view's UI delegate |
| 30 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate; | 39 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 - (void)loadRequest:(NSURLRequest*)request; | 85 - (void)loadRequest:(NSURLRequest*)request; |
| 77 | 86 |
| 78 // Evaluates a JavaScript string. | 87 // Evaluates a JavaScript string. |
| 79 // The completion handler is invoked when script evaluation completes. | 88 // The completion handler is invoked when script evaluation completes. |
| 80 - (void)evaluateJavaScript:(NSString*)javaScriptString | 89 - (void)evaluateJavaScript:(NSString*)javaScriptString |
| 81 completionHandler:(void (^)(id, NSError*))completionHandler; | 90 completionHandler:(void (^)(id, NSError*))completionHandler; |
| 82 | 91 |
| 83 @end | 92 @end |
| 84 | 93 |
| 85 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ | 94 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ |
| OLD | NEW |