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

Unified Diff: chrome/browser/extensions/api/identity/identity_api.h

Issue 10178020: Start implementing an auth flow for platform apps to be able to do auth (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698