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

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, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/identity/identity_api.h
===================================================================
--- chrome/browser/extensions/api/identity/identity_api.h (revision 137883)
+++ chrome/browser/extensions/api/identity/identity_api.h (working copy)
@@ -9,6 +9,7 @@
#include <string>
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/extensions/api/identity/web_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"
@@ -37,6 +38,24 @@
scoped_ptr<OAuth2MintTokenFlow> flow_;
};
+class LaunchWebAuthFlowFunction : public AsyncExtensionFunction,
+ public WebAuthFlow::Delegate {
+ public:
+ LaunchWebAuthFlowFunction();
+
+ private:
+ virtual ~LaunchWebAuthFlowFunction();
+ virtual bool RunImpl() OVERRIDE;
+
+ // WebAuthFlow::Delegate implementation.
+ virtual void OnAuthFlowSuccess(const std::string& redirect_url) OVERRIDE;
+ virtual void OnAuthFlowFailure() OVERRIDE;
+
+ scoped_ptr<WebAuthFlow> auth_flow_;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.launchWebAuthFlow");
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698