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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 scoped_ptr<OAuth2MintTokenFlow> flow_; | 51 scoped_ptr<OAuth2MintTokenFlow> flow_; |
52 | 52 |
53 // When launched in interactive mode, and if there is no existing grant, | 53 // When launched in interactive mode, and if there is no existing grant, |
54 // a permissions prompt will be popped up to the user. | 54 // a permissions prompt will be popped up to the user. |
55 scoped_ptr<ExtensionInstallPrompt> install_ui_; | 55 scoped_ptr<ExtensionInstallPrompt> install_ui_; |
56 }; | 56 }; |
57 | 57 |
58 class LaunchWebAuthFlowFunction : public AsyncExtensionFunction, | 58 class LaunchWebAuthFlowFunction : public AsyncExtensionFunction, |
59 public WebAuthFlow::Delegate { | 59 public WebAuthFlow::Delegate { |
60 public: | 60 public: |
| 61 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.launchWebAuthFlow"); |
| 62 |
61 LaunchWebAuthFlowFunction(); | 63 LaunchWebAuthFlowFunction(); |
62 | 64 |
63 private: | 65 private: |
64 virtual ~LaunchWebAuthFlowFunction(); | 66 virtual ~LaunchWebAuthFlowFunction(); |
65 virtual bool RunImpl() OVERRIDE; | 67 virtual bool RunImpl() OVERRIDE; |
66 | 68 |
67 // WebAuthFlow::Delegate implementation. | 69 // WebAuthFlow::Delegate implementation. |
68 virtual void OnAuthFlowSuccess(const std::string& redirect_url) OVERRIDE; | 70 virtual void OnAuthFlowSuccess(const std::string& redirect_url) OVERRIDE; |
69 virtual void OnAuthFlowFailure() OVERRIDE; | 71 virtual void OnAuthFlowFailure() OVERRIDE; |
70 | 72 |
71 scoped_ptr<WebAuthFlow> auth_flow_; | 73 scoped_ptr<WebAuthFlow> auth_flow_; |
72 | |
73 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.launchWebAuthFlow"); | |
74 }; | 74 }; |
75 | 75 |
76 } // namespace extensions | 76 } // namespace extensions |
77 | 77 |
78 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 78 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
OLD | NEW |