| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_ACTOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_ACTOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_ACTOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_ACTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 | 12 |
| 13 class GoogleServiceAuthError; | 13 class GoogleServiceAuthError; |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 | 16 |
| 17 // Interface class for the enterprise enrollment screen actor. | 17 // Interface class for the enterprise enrollment screen actor. |
| 18 class EnterpriseEnrollmentScreenActor { | 18 class EnterpriseEnrollmentScreenActor { |
| 19 public: | 19 public: |
| 20 // This defines the interface for controllers which will be called back when | 20 // This defines the interface for controllers which will be called back when |
| 21 // something happens on the UI. | 21 // something happens on the UI. |
| 22 class Controller { | 22 class Controller { |
| 23 public: | 23 public: |
| 24 virtual ~Controller() {} | 24 virtual ~Controller() {} |
| 25 | 25 |
| 26 virtual void OnAuthSubmitted(const std::string& user, | 26 virtual void OnAuthSubmitted(const std::string& user, |
| 27 const std::string& password, | 27 const std::string& password, |
| 28 const std::string& captcha, | 28 const std::string& captcha, |
| 29 const std::string& access_code) = 0; | 29 const std::string& access_code) = 0; |
| 30 virtual void OnOAuthTokenAvailable(const std::string& user, |
| 31 const std::string& oauth_token) = 0; |
| 30 virtual void OnAuthCancelled() = 0; | 32 virtual void OnAuthCancelled() = 0; |
| 31 virtual void OnConfirmationClosed() = 0; | 33 virtual void OnConfirmationClosed() = 0; |
| 32 virtual bool GetInitialUser(std::string* user) = 0; | 34 virtual bool GetInitialUser(std::string* user) = 0; |
| 33 }; | 35 }; |
| 34 | 36 |
| 35 // Used in PyAuto testing. | 37 // Used in PyAuto testing. |
| 36 class Observer { | 38 class Observer { |
| 37 public: | 39 public: |
| 38 virtual ~Observer() {} | 40 virtual ~Observer() {} |
| 39 | 41 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void NotifyObservers(bool succeeded); | 82 void NotifyObservers(bool succeeded); |
| 81 | 83 |
| 82 private: | 84 private: |
| 83 // Observers. | 85 // Observers. |
| 84 ObserverList<Observer> observer_list_; | 86 ObserverList<Observer> observer_list_; |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 } // namespace chromeos | 89 } // namespace chromeos |
| 88 | 90 |
| 89 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_ACTOR_H_ | 91 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_ACTOR_H_ |
| OLD | NEW |