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

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

Issue 2786033002: Expose way to set google api key through CWVWebView class method. (Closed)
Patch Set: added comment to static method 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 <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 // TODO(crbug.com/704946): Make framework style include work everywhere and 9 // TODO(crbug.com/704946): Make framework style include work everywhere and
10 // remove this #if. 10 // remove this #if.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // The current page title. 54 // The current page title.
55 @property(nonatomic, readonly, copy) NSString* title; 55 @property(nonatomic, readonly, copy) NSString* title;
56 56
57 // Page loading progress from 0.0 to 1.0. KVO compliant. 57 // Page loading progress from 0.0 to 1.0. KVO compliant.
58 // 58 //
59 // It is 0.0 initially before the first navigation starts. After a navigation 59 // It is 0.0 initially before the first navigation starts. After a navigation
60 // completes, it remains at 1.0 until a new navigation starts, at which point it 60 // completes, it remains at 1.0 until a new navigation starts, at which point it
61 // is reset to 0.0. 61 // is reset to 0.0.
62 @property(nonatomic, readonly) double estimatedProgress; 62 @property(nonatomic, readonly) double estimatedProgress;
63 63
64 // This is used by to communicate with the Translate API, among others.
Eugene But (OOO till 7-30) 2017/03/31 18:15:14 Could you please explain in the comments what argu
jzw1 2017/04/11 08:28:46 Done.
65 // This method should be called before any CWVWebViews are instantiated.
Eugene But (OOO till 7-30) 2017/03/31 18:15:14 "before any CWVWebViews are instantiated" or "befo
michaeldo 2017/03/31 20:28:16 IIRC this needs to happen before the object is ins
Hiroshi Ichikawa 2017/04/03 05:28:16 Should it happen even before +[CWV configureWithDe
jzw1 2017/04/11 08:28:46 I'd rather not add "before CWV configureWitDelegat
66 + (void)setGoogleAPIKey:(NSString*)googleAPIKey
67 clientID:(NSString*)clientID
68 clientSecret:(NSString*)clientSecret;
69
64 // |configuration| must not be null 70 // |configuration| must not be null
65 - (instancetype)initWithFrame:(CGRect)frame 71 - (instancetype)initWithFrame:(CGRect)frame
66 configuration:(CWVWebViewConfiguration*)configuration 72 configuration:(CWVWebViewConfiguration*)configuration
67 NS_DESIGNATED_INITIALIZER; 73 NS_DESIGNATED_INITIALIZER;
68 74
69 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; 75 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
70 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; 76 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
71 77
72 // Navigates backwards or forwards by one page. Does nothing if the 78 // Navigates backwards or forwards by one page. Does nothing if the
73 // corresponding |canGoBack| or |canGoForward| method returns NO. 79 // corresponding |canGoBack| or |canGoForward| method returns NO.
(...skipping 11 matching lines...) Expand all
85 - (void)loadRequest:(NSURLRequest*)request; 91 - (void)loadRequest:(NSURLRequest*)request;
86 92
87 // Evaluates a JavaScript string. 93 // Evaluates a JavaScript string.
88 // The completion handler is invoked when script evaluation completes. 94 // The completion handler is invoked when script evaluation completes.
89 - (void)evaluateJavaScript:(NSString*)javaScriptString 95 - (void)evaluateJavaScript:(NSString*)javaScriptString
90 completionHandler:(void (^)(id, NSError*))completionHandler; 96 completionHandler:(void (^)(id, NSError*))completionHandler;
91 97
92 @end 98 @end
93 99
94 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ 100 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_
OLDNEW
« ios/web_view/internal/cwv_web_view.mm ('K') | « ios/web_view/internal/cwv_web_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698