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

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

Issue 2791403005: Remove CWV class and move setting User Agent to CWVWebViewConfiguration. (Closed)
Patch Set: Move Browser State and Web Client ownership to CWVWebViewConfiguration. Each CWVWebViewConfiguratio… Created 3 years, 8 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_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 <ChromeWebView/cwv_export.h> 7 #import <ChromeWebView/cwv_export.h>
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 @class CWVWebViewConfiguration; 10 @class CWVWebViewConfiguration;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // The current page title. 47 // The current page title.
48 @property(nonatomic, readonly, copy) NSString* title; 48 @property(nonatomic, readonly, copy) NSString* title;
49 49
50 // Page loading progress from 0.0 to 1.0. KVO compliant. 50 // Page loading progress from 0.0 to 1.0. KVO compliant.
51 // 51 //
52 // It is 0.0 initially before the first navigation starts. After a navigation 52 // It is 0.0 initially before the first navigation starts. After a navigation
53 // completes, it remains at 1.0 until a new navigation starts, at which point it 53 // completes, it remains at 1.0 until a new navigation starts, at which point it
54 // is reset to 0.0. 54 // is reset to 0.0.
55 @property(nonatomic, readonly) double estimatedProgress; 55 @property(nonatomic, readonly) double estimatedProgress;
56 56
57 // Customizes the User Agent string. It should be of the format "product/1.0".
58 // NOTE: It is recommended to set |product| before initializing any web views.
59 //
60 // Setting |product| is only guaranteed to affect web views which have not yet
Eugene But (OOO till 7-30) 2017/04/11 17:52:42 Do you want to document how calling this API will
michaeldo 2017/04/11 21:57:03 I added a note that |product| is inserted into the
Eugene But (OOO till 7-30) 2017/04/12 00:46:17 I think it is helpful to explain why clients would
Eugene But (OOO till 7-30) 2017/04/12 17:48:27 Please take a look at this comment.
michaeldo 2017/04/12 18:22:55 I've added example UA.
61 // been initialized. However, exisiting web views could also be affected
62 // depending upon their internal state.
63 + (void)setUserAgentProduct:(NSString*)product;
64
57 // |configuration| must not be null 65 // |configuration| must not be null
58 - (instancetype)initWithFrame:(CGRect)frame 66 - (instancetype)initWithFrame:(CGRect)frame
59 configuration:(CWVWebViewConfiguration*)configuration 67 configuration:(CWVWebViewConfiguration*)configuration
60 NS_DESIGNATED_INITIALIZER; 68 NS_DESIGNATED_INITIALIZER;
61 69
62 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; 70 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
63 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 71 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
64 72
65 // Navigates backwards or forwards by one page. Does nothing if the 73 // Navigates backwards or forwards by one page. Does nothing if the
66 // corresponding |canGoBack| or |canGoForward| method returns NO. 74 // corresponding |canGoBack| or |canGoForward| method returns NO.
(...skipping 11 matching lines...) Expand all
78 - (void)loadRequest:(NSURLRequest*)request; 86 - (void)loadRequest:(NSURLRequest*)request;
79 87
80 // Evaluates a JavaScript string. 88 // Evaluates a JavaScript string.
81 // The completion handler is invoked when script evaluation completes. 89 // The completion handler is invoked when script evaluation completes.
82 - (void)evaluateJavaScript:(NSString*)javaScriptString 90 - (void)evaluateJavaScript:(NSString*)javaScriptString
83 completionHandler:(void (^)(id, NSError*))completionHandler; 91 completionHandler:(void (^)(id, NSError*))completionHandler;
84 92
85 @end 93 @end
86 94
87 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ 95 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698