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

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

Issue 10701041: implement sign in dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 146190)
+++ chrome/browser/extensions/api/identity/identity_api.h (working copy)
@@ -13,6 +13,7 @@
#include "chrome/browser/extensions/app_notify_channel_setup.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_function.h"
+#include "chrome/browser/ui/webui/signin/login_ui_service.h"
#include "chrome/common/net/gaia/oauth2_mint_token_flow.h"
class GoogleServiceAuthError;
@@ -21,7 +22,8 @@
class GetAuthTokenFunction : public AsyncExtensionFunction,
public OAuth2MintTokenFlow::Delegate,
- public ExtensionInstallPrompt::Delegate {
+ public ExtensionInstallPrompt::Delegate,
+ public LoginUIService::Observer {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.getAuthToken");
@@ -35,17 +37,30 @@
// OAuth2MintTokenFlow::Delegate implementation:
virtual void OnMintTokenSuccess(const std::string& access_token) OVERRIDE;
- virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) OVERRIDE;
+ virtual void OnMintTokenFailure(
+ const GoogleServiceAuthError& error) OVERRIDE;
virtual void OnIssueAdviceSuccess(
const IssueAdviceInfo& issue_advice) OVERRIDE;
+ // LoginUIService::Observer implementation.
+ virtual void OnLoginUIShown(LoginUIService::LoginUI* ui) OVERRIDE;
Evan Stade 2012/07/13 08:57:33 I can't find this interface in code search, was it
Munjal (Google) 2012/07/16 20:13:30 Yeah, that change was landed recently. But now it
+ virtual void OnLoginUIClosed(LoginUIService::LoginUI* ui) OVERRIDE;
+
// ExtensionInstallPrompt::Delegate implementation:
virtual void InstallUIProceed() OVERRIDE;
virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
+ // Shows the login UI in a browser popup.
+ bool StartLogin();
// Starts a MintTokenFlow with the given mode; Returns success.
bool StartFlow(OAuth2MintTokenFlow::Mode mode);
+ // Checks if there is a master login token to mint token for the extension.
Mihai Parparita -not on Chrome 2012/07/12 23:31:32 "to mint tokens" sounds more correct.
Munjal (Google) 2012/07/16 20:13:30 Done.
+ bool HasLoginToken() const;
+
+ // Gets the token mint flow mode based on a command-line flag.
+ OAuth2MintTokenFlow::Mode GetTokenFlowMode() const;
+
bool interactive_;
scoped_ptr<OAuth2MintTokenFlow> flow_;

Powered by Google App Engine
This is Rietveld 408576698