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

Unified Diff: ios/web_view/public/cwv_web_view.h

Issue 2791403005: Remove CWV class and move setting User Agent to CWVWebViewConfiguration. (Closed)
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web_view/public/cwv.h ('k') | ios/web_view/shell/shell_app_delegate.m » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/public/cwv_web_view.h
diff --git a/ios/web_view/public/cwv_web_view.h b/ios/web_view/public/cwv_web_view.h
index 1989c9e775fe69e0ea21a8873917656713125ff6..54bf295018f370e8f423d397cc1fed70f64538b5 100644
--- a/ios/web_view/public/cwv_web_view.h
+++ b/ios/web_view/public/cwv_web_view.h
@@ -54,6 +54,21 @@ CWV_EXPORT
// is reset to 0.0.
@property(nonatomic, readonly) double estimatedProgress;
+// The User Agent product string used to build the full User Agent.
++ (NSString*)userAgentProduct;
+
+// Customizes the User Agent string by inserting |product|. It should be of the
+// format "product/1.0". For example:
+// "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/603.1.30
+// (KHTML, like Gecko) <product> Mobile/16D32 Safari/602.1" where <product>
+// will be replaced with |product| or empty string if not set.
+//
+// NOTE: It is recommended to set |product| before initializing any web views.
+// Setting |product| is only guaranteed to affect web views which have not yet
+// been initialized. However, exisiting web views could also be affected
+// depending upon their internal state.
++ (void)setUserAgentProduct:(NSString*)product;
+
// |configuration| must not be null
- (instancetype)initWithFrame:(CGRect)frame
configuration:(CWVWebViewConfiguration*)configuration
« no previous file with comments | « ios/web_view/public/cwv.h ('k') | ios/web_view/shell/shell_app_delegate.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698