| 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_CRIWV_WEB_VIEW_H_ | 4 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ |
| 5 #define IOS_WEB_VIEW_PUBLIC_CRIWV_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 @class CRIWVWebViewConfiguration; | 9 @class CRIWVWebViewConfiguration; |
| 10 @protocol CRIWVWebViewDelegate; | 10 @protocol CRIWVWebViewDelegate; |
| 11 | 11 |
| 12 // A web view component (like WKWebView) which uses iOS Chromium's web view | 12 // A web view component (like WKWebView) which uses iOS Chromium's web view |
| 13 // implementation. | 13 // implementation. |
| 14 // | 14 // |
| 15 // In addition to WKWebView features, it allows Translate, Find In Page, | 15 // In addition to WKWebView features, it allows Translate, Find In Page, |
| 16 // Customizable Context Menus, and maybe more. | 16 // Customizable Context Menus, and maybe more. |
| 17 // | 17 // |
| 18 // Concrete instances can be created through CRIWV. | 18 // Concrete instances can be created through CRIWV. |
| 19 @interface CRIWVWebView : UIView | 19 @interface CWVWebView : UIView |
| 20 | 20 |
| 21 // The view used to display web content. | 21 // The view used to display web content. |
| 22 @property(nonatomic, readonly) UIView* view; | 22 @property(nonatomic, readonly) UIView* view; |
| 23 | 23 |
| 24 // This web view's delegate. | 24 // This web view's delegate. |
| 25 @property(nonatomic, weak) id<CRIWVWebViewDelegate> delegate; | 25 @property(nonatomic, weak) id<CRIWVWebViewDelegate> delegate; |
| 26 | 26 |
| 27 // Whether or not this web view can go backwards or forwards. | 27 // Whether or not this web view can go backwards or forwards. |
| 28 @property(nonatomic, readonly) BOOL canGoBack; | 28 @property(nonatomic, readonly) BOOL canGoBack; |
| 29 @property(nonatomic, readonly) BOOL canGoForward; | 29 @property(nonatomic, readonly) BOOL canGoForward; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Unlike WKWebView, this method supports HTTPBody. | 64 // Unlike WKWebView, this method supports HTTPBody. |
| 65 - (void)loadRequest:(NSURLRequest*)request; | 65 - (void)loadRequest:(NSURLRequest*)request; |
| 66 | 66 |
| 67 // Evaluates a JavaScript string. | 67 // Evaluates a JavaScript string. |
| 68 // The completion handler is invoked when script evaluation completes. | 68 // The completion handler is invoked when script evaluation completes. |
| 69 - (void)evaluateJavaScript:(NSString*)javaScriptString | 69 - (void)evaluateJavaScript:(NSString*)javaScriptString |
| 70 completionHandler:(void (^)(id, NSError*))completionHandler; | 70 completionHandler:(void (^)(id, NSError*))completionHandler; |
| 71 | 71 |
| 72 @end | 72 @end |
| 73 | 73 |
| 74 #endif // IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_H_ | 74 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ |
| OLD | NEW |