Index: chrome/browser/extensions/api/identity/identity_api.h |
=================================================================== |
--- chrome/browser/extensions/api/identity/identity_api.h (revision 134959) |
+++ chrome/browser/extensions/api/identity/identity_api.h (working copy) |
@@ -9,12 +9,17 @@ |
#include <string> |
#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/extensions/api/identity/extension_auth_flow.h" |
#include "chrome/browser/extensions/app_notify_channel_setup.h" |
#include "chrome/browser/extensions/extension_function.h" |
#include "chrome/common/net/gaia/oauth2_mint_token_flow.h" |
class GoogleServiceAuthError; |
+namespace content { |
+class WebContents; |
Mihai Parparita -not on Chrome
2012/05/04 22:37:18
This is unused.
Munjal (Google)
2012/05/08 19:26:35
Done.
|
+} |
+ |
namespace extensions { |
class GetAuthTokenFunction : public AsyncExtensionFunction, |
@@ -37,6 +42,24 @@ |
scoped_ptr<OAuth2MintTokenFlow> flow_; |
}; |
+class LaunchAuthFlowFunction : public AsyncExtensionFunction, |
+ public ExtensionAuthFlow::Delegate { |
+ public: |
+ LaunchAuthFlowFunction(); |
+ |
+ private: |
+ virtual ~LaunchAuthFlowFunction(); |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ // ExtensionAuthFlow::Delegate implementation. |
+ virtual void OnAuthFlowCompleted(const std::string& redirect_url) OVERRIDE; |
+ virtual void OnAuthFlowFailed() OVERRIDE; |
+ |
+ scoped_ptr<ExtensionAuthFlow> auth_flow_; |
+ |
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.launchAuthFlow"); |
+}; |
+ |
} // namespace extensions |
#endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |