Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Side by Side Diff: ios/web_view/public/criwv_web_view.h

Issue 2675633002: Let CRIWVWebView inherit UIView instead of NSObject. (Closed)
Patch Set: Fix format. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_CRIWV_WEB_VIEW_H_
5 #define IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_H_ 5 #define IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_H_
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 @protocol CRIWVWebViewDelegate; 9 @protocol CRIWVWebViewDelegate;
10 10
11 // Primary objective-c interface for web/. Just like a WKWebView, but better. 11 // Primary objective-c interface for web/. Just like a WKWebView, but better.
Eugene But (OOO till 7-30) 2017/02/02 20:54:32 Do you want to update this comment? This is not an
Hiroshi Ichikawa 2017/02/03 02:14:57 Done.
12 // Concrete instances can be created through CRIWV. 12 // Concrete instances can be created through CRIWV.
13 @protocol CRIWVWebView<NSObject> 13 @interface CRIWVWebView : UIView
14 14
15 // The view used to display web content. 15 // The view used to display web content.
16 @property(nonatomic, readonly) UIView* view; 16 @property(nonatomic, readonly) UIView* view;
17 17
18 // This web view's delegate. 18 // This web view's delegate.
19 @property(nonatomic, readwrite, assign) id<CRIWVWebViewDelegate> delegate; 19 @property(nonatomic, readwrite, assign) id<CRIWVWebViewDelegate> delegate;
20 20
21 // Whether or not this web view can go backwards or forwards. 21 // Whether or not this web view can go backwards or forwards.
22 @property(nonatomic, readonly) BOOL canGoBack; 22 @property(nonatomic, readonly) BOOL canGoBack;
23 @property(nonatomic, readonly) BOOL canGoForward; 23 @property(nonatomic, readonly) BOOL canGoForward;
24 24
25 // Whether or not this web view is loading a page. 25 // Whether or not this web view is loading a page.
26 @property(nonatomic, readonly) BOOL isLoading; 26 @property(nonatomic, readonly) BOOL isLoading;
27 27
28 // The current URL, for display to the user. 28 // The current URL, for display to the user.
29 @property(nonatomic, readonly) NSURL* visibleURL; 29 @property(nonatomic, readonly) NSURL* visibleURL;
30 30
31 // The current page title. 31 // The current page title.
32 @property(nonatomic, readonly) NSString* pageTitle; 32 @property(nonatomic, readonly) NSString* pageTitle;
33 33
34 // The current load progress, as a fraction between 0 and 1. This value is 34 // The current load progress, as a fraction between 0 and 1. This value is
35 // undefined if the web view is not currently loading. 35 // undefined if the web view is not currently loading.
36 @property(nonatomic, readonly) CGFloat loadProgress; 36 @property(nonatomic, readonly) CGFloat loadProgress;
37 37
38 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
39 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
40
38 // Navigates backwards or forwards by one page. Does nothing if the 41 // Navigates backwards or forwards by one page. Does nothing if the
39 // corresponding |canGoBack| or |canGoForward| method returns NO. 42 // corresponding |canGoBack| or |canGoForward| method returns NO.
40 - (void)goBack; 43 - (void)goBack;
41 - (void)goForward; 44 - (void)goForward;
42 45
43 // Reloads the current page. 46 // Reloads the current page.
44 - (void)reload; 47 - (void)reload;
45 48
46 // Stops loading the current page. 49 // Stops loading the current page.
47 - (void)stopLoading; 50 - (void)stopLoading;
48 51
49 // Loads the given |url| in this web view. 52 // Loads the given |url| in this web view.
50 - (void)loadURL:(NSURL*)url; 53 - (void)loadURL:(NSURL*)url;
51 54
52 // Evaluates a JavaScript string. 55 // Evaluates a JavaScript string.
53 // The completion handler is invoked when script evaluation completes. 56 // The completion handler is invoked when script evaluation completes.
54 - (void)evaluateJavaScript:(NSString*)javaScriptString 57 - (void)evaluateJavaScript:(NSString*)javaScriptString
55 completionHandler:(void (^)(id, NSError*))completionHandler; 58 completionHandler:(void (^)(id, NSError*))completionHandler;
56 59
57 @end 60 @end
58 61
59 #endif // IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_H_ 62 #endif // IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698