Chromium Code Reviews| 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 @class CWVWebViewConfiguration; | 9 @class CWVWebViewConfiguration; |
| 10 @protocol CWVUIDelegate; | 10 @protocol CWVUIDelegate; |
| 11 @protocol CWVTranslateDelegate; | 11 @protocol CWVTranslateDelegate; |
| 12 @protocol CWVNavigationDelegate; | 12 @protocol CWVNavigationDelegate; |
| 13 | 13 |
| 14 // A web view component (like WKWebView) which uses iOS Chromium's web view | 14 // A web view component (like WKWebView) which uses iOS Chromium's web view |
| 15 // implementation. | 15 // implementation. |
| 16 // | 16 // |
| 17 // In addition to WKWebView features, it allows Translate, Find In Page, | 17 // In addition to WKWebView features, it allows Translate, Find In Page, |
| 18 // Customizable Context Menus, and maybe more. | 18 // Customizable Context Menus, and maybe more. |
| 19 // | 19 // |
| 20 // Concrete instances can be created through CWV. | 20 // Concrete instances can be created through CWV. |
| 21 @interface CWVWebView : UIView | 21 @interface CWVWebView : UIView |
| 22 | 22 |
| 23 @property(readonly, copy) CWVWebViewConfiguration* configuration; | |
|
michaeldo
2017/03/21 16:12:35
Is exposing this needed?
Eugene But (OOO till 7-30)
2017/03/21 16:47:55
nonatomic?
Eugene But (OOO till 7-30)
2017/03/21 16:47:55
This matches our API spec.
michaeldo
2017/03/21 17:24:03
Of course, sorry.
Hiroshi Ichikawa
2017/03/22 04:52:53
Done.
BTW Many properties including this one are
Eugene But (OOO till 7-30)
2017/03/22 15:08:50
Copy affects getter, and will generate code simila
Hiroshi Ichikawa
2017/03/23 02:18:40
Hmm it looks it doesn't affect the getter as far a
Eugene But (OOO till 7-30)
2017/03/23 16:17:02
Maybe this is an optimization for immutable object
| |
| 24 | |
| 23 // The view used to display web content. | 25 // The view used to display web content. |
| 24 @property(nonatomic, readonly) UIView* view; | 26 @property(nonatomic, readonly) UIView* view; |
|
Eugene But (OOO till 7-30)
2017/03/21 16:47:55
Do we have a bug to remove this property?
Hiroshi Ichikawa
2017/03/22 04:52:53
I believe I have just forgotten to delete it. File
| |
| 25 | 27 |
| 26 // This web view's navigation delegate. | 28 // This web view's navigation delegate. |
| 27 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate; | 29 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate; |
| 28 | 30 |
| 29 // This web view's UI delegate | 31 // This web view's UI delegate |
| 30 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate; | 32 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate; |
| 31 | 33 |
| 32 // A delegate for the translation feature. | 34 // A delegate for the translation feature. |
| 33 @property(nonatomic, weak) id<CWVTranslateDelegate> translationDelegate; | 35 @property(nonatomic, weak) id<CWVTranslateDelegate> translationDelegate; |
| 34 | 36 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 - (void)loadRequest:(NSURLRequest*)request; | 78 - (void)loadRequest:(NSURLRequest*)request; |
| 77 | 79 |
| 78 // Evaluates a JavaScript string. | 80 // Evaluates a JavaScript string. |
| 79 // The completion handler is invoked when script evaluation completes. | 81 // The completion handler is invoked when script evaluation completes. |
| 80 - (void)evaluateJavaScript:(NSString*)javaScriptString | 82 - (void)evaluateJavaScript:(NSString*)javaScriptString |
| 81 completionHandler:(void (^)(id, NSError*))completionHandler; | 83 completionHandler:(void (^)(id, NSError*))completionHandler; |
| 82 | 84 |
| 83 @end | 85 @end |
| 84 | 86 |
| 85 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ | 87 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ |
| OLD | NEW |