| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 scoped_ptr<ExtensionTokenKey> token_key_; | 289 scoped_ptr<ExtensionTokenKey> token_key_; |
| 290 std::string oauth2_client_id_; | 290 std::string oauth2_client_id_; |
| 291 // When launched in interactive mode, and if there is no existing grant, | 291 // When launched in interactive mode, and if there is no existing grant, |
| 292 // a permissions prompt will be popped up to the user. | 292 // a permissions prompt will be popped up to the user. |
| 293 IssueAdviceInfo issue_advice_; | 293 IssueAdviceInfo issue_advice_; |
| 294 scoped_ptr<GaiaWebAuthFlow> gaia_web_auth_flow_; | 294 scoped_ptr<GaiaWebAuthFlow> gaia_web_auth_flow_; |
| 295 scoped_ptr<IdentitySigninFlow> signin_flow_; | 295 scoped_ptr<IdentitySigninFlow> signin_flow_; |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 class IdentityGetProfileUserInfoFunction |
| 299 : public ChromeUIThreadExtensionFunction { |
| 300 public: |
| 301 DECLARE_EXTENSION_FUNCTION("identity.getProfileUserInfo", |
| 302 IDENTITY_GETPROFILEUSERINFO); |
| 303 |
| 304 IdentityGetProfileUserInfoFunction(); |
| 305 |
| 306 private: |
| 307 virtual ~IdentityGetProfileUserInfoFunction(); |
| 308 |
| 309 // UIThreadExtensionFunction implementation. |
| 310 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; |
| 311 }; |
| 312 |
| 298 class IdentityRemoveCachedAuthTokenFunction | 313 class IdentityRemoveCachedAuthTokenFunction |
| 299 : public ChromeSyncExtensionFunction { | 314 : public ChromeSyncExtensionFunction { |
| 300 public: | 315 public: |
| 301 DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken", | 316 DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken", |
| 302 EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN) | 317 EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN) |
| 303 IdentityRemoveCachedAuthTokenFunction(); | 318 IdentityRemoveCachedAuthTokenFunction(); |
| 304 | 319 |
| 305 protected: | 320 protected: |
| 306 virtual ~IdentityRemoveCachedAuthTokenFunction(); | 321 virtual ~IdentityRemoveCachedAuthTokenFunction(); |
| 307 | 322 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 332 // Helper to initialize final URL prefix. | 347 // Helper to initialize final URL prefix. |
| 333 void InitFinalRedirectURLPrefix(const std::string& extension_id); | 348 void InitFinalRedirectURLPrefix(const std::string& extension_id); |
| 334 | 349 |
| 335 scoped_ptr<WebAuthFlow> auth_flow_; | 350 scoped_ptr<WebAuthFlow> auth_flow_; |
| 336 GURL final_url_prefix_; | 351 GURL final_url_prefix_; |
| 337 }; | 352 }; |
| 338 | 353 |
| 339 } // namespace extensions | 354 } // namespace extensions |
| 340 | 355 |
| 341 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 356 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| OLD | NEW |