OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_REMOTING_SETUP_FLOW_LOGIN_STEP_H_ |
| 6 #define CHROME_BROWSER_REMOTING_SETUP_FLOW_LOGIN_STEP_H_ |
| 7 |
| 8 #include "chrome/browser/remoting/setup_flow.h" |
| 9 #include "chrome/common/net/gaia/gaia_auth_consumer.h" |
| 10 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
| 11 |
| 12 namespace remoting { |
| 13 |
| 14 // Implementation of login step for remoting setup flow. |
| 15 class SetupFlowLoginStep : public SetupFlowStepBase, public GaiaAuthConsumer { |
| 16 public: |
| 17 SetupFlowLoginStep(); |
| 18 virtual ~SetupFlowLoginStep(); |
| 19 |
| 20 // SetupFlowStep implementation. |
| 21 virtual void HandleMessage(const std::string& message, |
| 22 const ListValue* args); |
| 23 virtual void Cancel(); |
| 24 |
| 25 // GaiaAuthConsumer implementation. |
| 26 virtual void OnClientLoginSuccess( |
| 27 const GaiaAuthConsumer::ClientLoginResult& credentials); |
| 28 virtual void OnClientLoginFailure( |
| 29 const GoogleServiceAuthError& error); |
| 30 virtual void OnIssueAuthTokenSuccess(const std::string& service, |
| 31 const std::string& auth_token); |
| 32 virtual void OnIssueAuthTokenFailure(const std::string& service, |
| 33 const GoogleServiceAuthError& error); |
| 34 |
| 35 protected: |
| 36 virtual void DoStart(); |
| 37 |
| 38 private: |
| 39 void OnUserSubmittedAuth(const std::string& user, |
| 40 const std::string& password, |
| 41 const std::string& captcha); |
| 42 |
| 43 void ShowGaiaLogin(const DictionaryValue& args); |
| 44 void ShowGaiaSuccessAndSettingUp(); |
| 45 void ShowGaiaFailed(const GoogleServiceAuthError& error); |
| 46 |
| 47 // Fetcher to obtain the Chromoting Directory token. |
| 48 scoped_ptr<GaiaAuthFetcher> authenticator_; |
| 49 std::string login_; |
| 50 std::string remoting_token_; |
| 51 std::string talk_token_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(SetupFlowLoginStep); |
| 54 }; |
| 55 |
| 56 } // namespace remoting |
| 57 |
| 58 #endif // CHROME_BROWSER_REMOTING_SETUP_FLOW_LOGIN_STEP_H_ |
OLD | NEW |