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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 IdentityGetProfileUserInfoFunction(); | 312 IdentityGetProfileUserInfoFunction(); |
313 | 313 |
314 private: | 314 private: |
315 ~IdentityGetProfileUserInfoFunction() override; | 315 ~IdentityGetProfileUserInfoFunction() override; |
316 | 316 |
317 // UIThreadExtensionFunction implementation. | 317 // UIThreadExtensionFunction implementation. |
318 ExtensionFunction::ResponseAction Run() override; | 318 ExtensionFunction::ResponseAction Run() override; |
319 }; | 319 }; |
320 | 320 |
321 class IdentityRemoveCachedAuthTokenFunction | 321 class IdentityRemoveCachedAuthTokenFunction : public UIThreadExtensionFunction { |
322 : public ChromeSyncExtensionFunction { | |
323 public: | 322 public: |
324 DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken", | 323 DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken", |
325 EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN) | 324 EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN) |
326 IdentityRemoveCachedAuthTokenFunction(); | 325 IdentityRemoveCachedAuthTokenFunction(); |
327 | 326 |
328 protected: | 327 protected: |
329 ~IdentityRemoveCachedAuthTokenFunction() override; | 328 ~IdentityRemoveCachedAuthTokenFunction() override; |
330 | 329 |
331 // SyncExtensionFunction implementation: | 330 // ExtensionFunction: |
332 bool RunSync() override; | 331 ResponseAction Run() override; |
333 }; | 332 }; |
334 | 333 |
335 class IdentityLaunchWebAuthFlowFunction : public ChromeAsyncExtensionFunction, | 334 class IdentityLaunchWebAuthFlowFunction : public ChromeAsyncExtensionFunction, |
336 public WebAuthFlow::Delegate { | 335 public WebAuthFlow::Delegate { |
337 public: | 336 public: |
338 DECLARE_EXTENSION_FUNCTION("identity.launchWebAuthFlow", | 337 DECLARE_EXTENSION_FUNCTION("identity.launchWebAuthFlow", |
339 EXPERIMENTAL_IDENTITY_LAUNCHWEBAUTHFLOW); | 338 EXPERIMENTAL_IDENTITY_LAUNCHWEBAUTHFLOW); |
340 | 339 |
341 IdentityLaunchWebAuthFlowFunction(); | 340 IdentityLaunchWebAuthFlowFunction(); |
342 | 341 |
(...skipping 12 matching lines...) Expand all Loading... |
355 // Helper to initialize final URL prefix. | 354 // Helper to initialize final URL prefix. |
356 void InitFinalRedirectURLPrefix(const std::string& extension_id); | 355 void InitFinalRedirectURLPrefix(const std::string& extension_id); |
357 | 356 |
358 std::unique_ptr<WebAuthFlow> auth_flow_; | 357 std::unique_ptr<WebAuthFlow> auth_flow_; |
359 GURL final_url_prefix_; | 358 GURL final_url_prefix_; |
360 }; | 359 }; |
361 | 360 |
362 } // namespace extensions | 361 } // namespace extensions |
363 | 362 |
364 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 363 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
OLD | NEW |