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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.h

Issue 2671653004: Move impl of identity.GetAccounts() extension API to its own file (Closed)
Patch Set: nit Created 3 years, 10 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 (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_get_accounts_function. h"
21 #include "chrome/browser/extensions/api/identity/identity_get_auth_token_functio n.h" 22 #include "chrome/browser/extensions/api/identity/identity_get_auth_token_functio n.h"
22 #include "chrome/browser/extensions/api/identity/identity_get_profile_user_info_ function.h" 23 #include "chrome/browser/extensions/api/identity/identity_get_profile_user_info_ function.h"
23 #include "chrome/browser/extensions/api/identity/identity_launch_web_auth_flow_f unction.h" 24 #include "chrome/browser/extensions/api/identity/identity_launch_web_auth_flow_f unction.h"
24 #include "chrome/browser/extensions/api/identity/identity_mint_queue.h" 25 #include "chrome/browser/extensions/api/identity/identity_mint_queue.h"
25 #include "chrome/browser/extensions/api/identity/identity_remove_cached_auth_tok en_function.h" 26 #include "chrome/browser/extensions/api/identity/identity_remove_cached_auth_tok en_function.h"
26 #include "chrome/browser/extensions/api/identity/identity_signin_flow.h" 27 #include "chrome/browser/extensions/api/identity/identity_signin_flow.h"
27 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" 28 #include "chrome/browser/extensions/api/identity/web_auth_flow.h"
28 #include "chrome/browser/extensions/chrome_extension_function.h" 29 #include "chrome/browser/extensions/chrome_extension_function.h"
29 #include "components/signin/core/browser/profile_identity_provider.h" 30 #include "components/signin/core/browser/profile_identity_provider.h"
30 #include "extensions/browser/browser_context_keyed_api_factory.h" 31 #include "extensions/browser/browser_context_keyed_api_factory.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ProfileIdentityProvider profile_identity_provider_; 127 ProfileIdentityProvider profile_identity_provider_;
127 gaia::AccountTracker account_tracker_; 128 gaia::AccountTracker account_tracker_;
128 129
129 // May be null. 130 // May be null.
130 IdentityGetAuthTokenFunction* get_auth_token_function_; 131 IdentityGetAuthTokenFunction* get_auth_token_function_;
131 }; 132 };
132 133
133 template <> 134 template <>
134 void BrowserContextKeyedAPIFactory<IdentityAPI>::DeclareFactoryDependencies(); 135 void BrowserContextKeyedAPIFactory<IdentityAPI>::DeclareFactoryDependencies();
135 136
136 class IdentityGetAccountsFunction : public ChromeUIThreadExtensionFunction {
137 public:
138 DECLARE_EXTENSION_FUNCTION("identity.getAccounts",
139 IDENTITY_GETACCOUNTS);
140
141 IdentityGetAccountsFunction();
142
143 private:
144 ~IdentityGetAccountsFunction() override;
145
146 // UIThreadExtensionFunction implementation.
147 ExtensionFunction::ResponseAction Run() override;
148 };
149
150 } // namespace extensions 137 } // namespace extensions
151 138
152 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 139 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/BUILD.gn ('k') | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698