| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 4 |
| 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // authentication token. | 150 // authentication token. |
| 151 // This may be called on an arbitrary thread, but callback will always be on | 151 // This may be called on an arbitrary thread, but callback will always be on |
| 152 // the main thread. | 152 // the main thread. |
| 153 virtual void ForgetIdentity(ChromeIdentity* identity, | 153 virtual void ForgetIdentity(ChromeIdentity* identity, |
| 154 ForgetIdentityCallback callback); | 154 ForgetIdentityCallback callback); |
| 155 | 155 |
| 156 // Asynchronously retrieves access tokens for the given identity and scopes. | 156 // Asynchronously retrieves access tokens for the given identity and scopes. |
| 157 // Uses the default client id and client secret. | 157 // Uses the default client id and client secret. |
| 158 virtual void GetAccessToken(ChromeIdentity* identity, | 158 virtual void GetAccessToken(ChromeIdentity* identity, |
| 159 const std::set<std::string>& scopes, | 159 const std::set<std::string>& scopes, |
| 160 const AccessTokenCallback& callback); | 160 AccessTokenCallback callback); |
| 161 | 161 |
| 162 // Asynchronously retrieves access tokens for the given identity and scopes. | 162 // Asynchronously retrieves access tokens for the given identity and scopes. |
| 163 virtual void GetAccessToken(ChromeIdentity* identity, | 163 virtual void GetAccessToken(ChromeIdentity* identity, |
| 164 const std::string& client_id, | 164 const std::string& client_id, |
| 165 const std::string& client_secret, | 165 const std::string& client_secret, |
| 166 const std::set<std::string>& scopes, | 166 const std::set<std::string>& scopes, |
| 167 const AccessTokenCallback& callback); | 167 AccessTokenCallback callback); |
| 168 | 168 |
| 169 // Fetches the profile avatar, from the cache or the network. | 169 // Fetches the profile avatar, from the cache or the network. |
| 170 // For high resolution iPads, returns large images (200 x 200) to avoid | 170 // For high resolution iPads, returns large images (200 x 200) to avoid |
| 171 // pixelization. Calls back on the main thread. | 171 // pixelization. Calls back on the main thread. |
| 172 virtual void GetAvatarForIdentity(ChromeIdentity* identity, | 172 virtual void GetAvatarForIdentity(ChromeIdentity* identity, |
| 173 GetAvatarCallback callback); | 173 GetAvatarCallback callback); |
| 174 | 174 |
| 175 // Synchronously returns any cached avatar, or nil. | 175 // Synchronously returns any cached avatar, or nil. |
| 176 // GetAvatarForIdentity() should be generally used instead of this method. | 176 // GetAvatarForIdentity() should be generally used instead of this method. |
| 177 virtual UIImage* GetCachedAvatarForIdentity(ChromeIdentity* identity); | 177 virtual UIImage* GetCachedAvatarForIdentity(ChromeIdentity* identity); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 private: | 219 private: |
| 220 base::ObserverList<Observer, true> observer_list_; | 220 base::ObserverList<Observer, true> observer_list_; |
| 221 | 221 |
| 222 DISALLOW_COPY_AND_ASSIGN(ChromeIdentityService); | 222 DISALLOW_COPY_AND_ASSIGN(ChromeIdentityService); |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace ios | 225 } // namespace ios |
| 226 | 226 |
| 227 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ | 227 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ |
| OLD | NEW |