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

Unified Diff: chrome/browser/remoting/setup_flow_login_step.h

Issue 5985003: New remoting setup flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years 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 | « chrome/browser/remoting/setup_flow.cc ('k') | chrome/browser/remoting/setup_flow_login_step.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/remoting/setup_flow_login_step.h
diff --git a/chrome/browser/remoting/setup_flow_login_step.h b/chrome/browser/remoting/setup_flow_login_step.h
new file mode 100644
index 0000000000000000000000000000000000000000..7c48df7d0f81b3f1a1a41bfe42a69e32bf4adfc5
--- /dev/null
+++ b/chrome/browser/remoting/setup_flow_login_step.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_REMOTING_SETUP_FLOW_LOGIN_STEP_H_
+#define CHROME_BROWSER_REMOTING_SETUP_FLOW_LOGIN_STEP_H_
+
+#include "chrome/browser/remoting/setup_flow.h"
+#include "chrome/common/net/gaia/gaia_auth_consumer.h"
+#include "chrome/common/net/gaia/gaia_auth_fetcher.h"
+
+namespace remoting {
+
+// Implementation of login step for remoting setup flow.
+class SetupFlowLoginStep : public SetupFlowStepBase, public GaiaAuthConsumer {
+ public:
+ SetupFlowLoginStep();
+ virtual ~SetupFlowLoginStep();
+
+ // SetupFlowStep implementation.
+ virtual void HandleMessage(const std::string& message,
+ const ListValue* args);
+ virtual void Cancel();
+
+ // GaiaAuthConsumer implementation.
+ virtual void OnClientLoginSuccess(
+ const GaiaAuthConsumer::ClientLoginResult& credentials);
+ virtual void OnClientLoginFailure(
+ const GoogleServiceAuthError& error);
+ virtual void OnIssueAuthTokenSuccess(const std::string& service,
+ const std::string& auth_token);
+ virtual void OnIssueAuthTokenFailure(const std::string& service,
+ const GoogleServiceAuthError& error);
+
+ protected:
+ virtual void DoStart();
+
+ private:
+ void OnUserSubmittedAuth(const std::string& user,
+ const std::string& password,
+ const std::string& captcha);
+
+ void ShowGaiaLogin(const DictionaryValue& args);
+ void ShowGaiaSuccessAndSettingUp();
+ void ShowGaiaFailed(const GoogleServiceAuthError& error);
+
+ // Fetcher to obtain the Chromoting Directory token.
+ scoped_ptr<GaiaAuthFetcher> authenticator_;
+ std::string login_;
+ std::string remoting_token_;
+ std::string talk_token_;
+
+ DISALLOW_COPY_AND_ASSIGN(SetupFlowLoginStep);
+};
+
+} // namespace remoting
+
+#endif // CHROME_BROWSER_REMOTING_SETUP_FLOW_LOGIN_STEP_H_
« no previous file with comments | « chrome/browser/remoting/setup_flow.cc ('k') | chrome/browser/remoting/setup_flow_login_step.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698