| 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> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "chrome/browser/extensions/api/identity/extension_token_key.h" | 19 #include "chrome/browser/extensions/api/identity/extension_token_key.h" |
| 20 #include "chrome/browser/extensions/api/identity/gaia_web_auth_flow.h" | 20 #include "chrome/browser/extensions/api/identity/gaia_web_auth_flow.h" |
| 21 #include "chrome/browser/extensions/api/identity/identity_launch_web_auth_flow_f
unction.h" | 21 #include "chrome/browser/extensions/api/identity/identity_launch_web_auth_flow_f
unction.h" |
| 22 #include "chrome/browser/extensions/api/identity/identity_mint_queue.h" | 22 #include "chrome/browser/extensions/api/identity/identity_mint_queue.h" |
| 23 #include "chrome/browser/extensions/api/identity/identity_remove_cached_auth_tok
en_function.h" |
| 23 #include "chrome/browser/extensions/api/identity/identity_signin_flow.h" | 24 #include "chrome/browser/extensions/api/identity/identity_signin_flow.h" |
| 24 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" | 25 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
| 25 #include "chrome/browser/extensions/chrome_extension_function.h" | 26 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 26 #include "components/signin/core/browser/profile_identity_provider.h" | 27 #include "components/signin/core/browser/profile_identity_provider.h" |
| 27 #include "extensions/browser/browser_context_keyed_api_factory.h" | 28 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 28 #include "google_apis/gaia/account_tracker.h" | 29 #include "google_apis/gaia/account_tracker.h" |
| 29 #include "google_apis/gaia/oauth2_mint_token_flow.h" | 30 #include "google_apis/gaia/oauth2_mint_token_flow.h" |
| 30 #include "google_apis/gaia/oauth2_token_service.h" | 31 #include "google_apis/gaia/oauth2_token_service.h" |
| 31 | 32 |
| 32 class GoogleServiceAuthError; | 33 class GoogleServiceAuthError; |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 313 |
| 313 IdentityGetProfileUserInfoFunction(); | 314 IdentityGetProfileUserInfoFunction(); |
| 314 | 315 |
| 315 private: | 316 private: |
| 316 ~IdentityGetProfileUserInfoFunction() override; | 317 ~IdentityGetProfileUserInfoFunction() override; |
| 317 | 318 |
| 318 // UIThreadExtensionFunction implementation. | 319 // UIThreadExtensionFunction implementation. |
| 319 ExtensionFunction::ResponseAction Run() override; | 320 ExtensionFunction::ResponseAction Run() override; |
| 320 }; | 321 }; |
| 321 | 322 |
| 322 class IdentityRemoveCachedAuthTokenFunction : public UIThreadExtensionFunction { | |
| 323 public: | |
| 324 DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken", | |
| 325 EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN) | |
| 326 IdentityRemoveCachedAuthTokenFunction(); | |
| 327 | |
| 328 protected: | |
| 329 ~IdentityRemoveCachedAuthTokenFunction() override; | |
| 330 | |
| 331 // ExtensionFunction: | |
| 332 ResponseAction Run() override; | |
| 333 }; | |
| 334 | |
| 335 } // namespace extensions | 323 } // namespace extensions |
| 336 | 324 |
| 337 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 325 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| OLD | NEW |