| Index: ios/web_view/internal/cwv_web_view.mm
|
| diff --git a/ios/web_view/internal/cwv_web_view.mm b/ios/web_view/internal/cwv_web_view.mm
|
| index 08fb4d8dc30b2994005f51fbd5799b2b1efbc42c..0da46bd48a7c6b8c517da960386e2403ce02aa41 100644
|
| --- a/ios/web_view/internal/cwv_web_view.mm
|
| +++ b/ios/web_view/internal/cwv_web_view.mm
|
| @@ -10,6 +10,7 @@
|
| #import "base/ios/weak_nsobject.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| +#include "google_apis/google_api_keys.h"
|
| #import "ios/web/public/navigation_manager.h"
|
| #include "ios/web/public/referrer.h"
|
| #include "ios/web/public/reload_type.h"
|
| @@ -60,6 +61,21 @@
|
| @synthesize estimatedProgress = _estimatedProgress;
|
| @synthesize UIDelegate = _UIDelegate;
|
|
|
| ++ (void)setGoogleAPIKey:(NSString*)googleAPIKey
|
| + clientID:(NSString*)clientID
|
| + clientSecret:(NSString*)clientSecret {
|
| + google_apis::SetAPIKey(base::SysNSStringToUTF8(googleAPIKey));
|
| +
|
| + std::string clientIDString = base::SysNSStringToUTF8(clientID);
|
| + std::string clientSecretString = base::SysNSStringToUTF8(clientSecret);
|
| + for (size_t i = 0; i < google_apis::CLIENT_NUM_ITEMS; ++i) {
|
| + google_apis::OAuth2Client client =
|
| + static_cast<google_apis::OAuth2Client>(i);
|
| + google_apis::SetOAuth2ClientID(client, clientIDString);
|
| + google_apis::SetOAuth2ClientSecret(client, clientSecretString);
|
| + }
|
| +}
|
| +
|
| - (instancetype)initWithFrame:(CGRect)frame
|
| configuration:(CWVWebViewConfiguration*)configuration {
|
| self = [super initWithFrame:frame];
|
|
|