| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC
TOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC
TOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC
TOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC
TOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // are not covered by GoogleServiceAuthError or EnrollmentStatus. | 22 // are not covered by GoogleServiceAuthError or EnrollmentStatus. |
| 23 enum UIError { | 23 enum UIError { |
| 24 // Existing enrollment domain doesn't match authentication user. | 24 // Existing enrollment domain doesn't match authentication user. |
| 25 UI_ERROR_DOMAIN_MISMATCH, | 25 UI_ERROR_DOMAIN_MISMATCH, |
| 26 // Requested device mode not supported with auto enrollment. | 26 // Requested device mode not supported with auto enrollment. |
| 27 UI_ERROR_AUTO_ENROLLMENT_BAD_MODE, | 27 UI_ERROR_AUTO_ENROLLMENT_BAD_MODE, |
| 28 // Unexpected error condition, indicates a bug in the code. | 28 // Unexpected error condition, indicates a bug in the code. |
| 29 UI_ERROR_FATAL, | 29 UI_ERROR_FATAL, |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 // TODO(mnissler): Remove this enum once enrollment has been switched to | |
| 33 // DeviceCloudPolicyManagerChromeOS (http://crbug.com/108928) for good. | |
| 34 enum EnrollmentError { | |
| 35 DOMAIN_MISMATCH_ERROR, | |
| 36 FATAL_ERROR, | |
| 37 ACCOUNT_ERROR, | |
| 38 SERIAL_NUMBER_ERROR, | |
| 39 ENROLLMENT_MODE_ERROR, | |
| 40 FATAL_AUTH_ERROR, | |
| 41 AUTO_ENROLLMENT_ERROR, | |
| 42 NETWORK_ERROR, | |
| 43 LOCKBOX_TIMEOUT_ERROR, | |
| 44 MISSING_LICENSES_ERROR, | |
| 45 }; | |
| 46 | |
| 47 // This defines the interface for controllers which will be called back when | 32 // This defines the interface for controllers which will be called back when |
| 48 // something happens on the UI. | 33 // something happens on the UI. |
| 49 class Controller { | 34 class Controller { |
| 50 public: | 35 public: |
| 51 virtual ~Controller() {} | 36 virtual ~Controller() {} |
| 52 | 37 |
| 53 virtual void OnLoginDone(const std::string& user) = 0; | 38 virtual void OnLoginDone(const std::string& user) = 0; |
| 54 virtual void OnAuthError(const GoogleServiceAuthError& error) = 0; | 39 virtual void OnAuthError(const GoogleServiceAuthError& error) = 0; |
| 55 virtual void OnOAuthTokenAvailable(const std::string& oauth_token) = 0; | 40 virtual void OnOAuthTokenAvailable(const std::string& oauth_token) = 0; |
| 56 virtual void OnRetry() = 0; | 41 virtual void OnRetry() = 0; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0; | 85 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0; |
| 101 | 86 |
| 102 // Used for testing only. | 87 // Used for testing only. |
| 103 virtual void SubmitTestCredentials(const std::string& email, | 88 virtual void SubmitTestCredentials(const std::string& email, |
| 104 const std::string& password) = 0; | 89 const std::string& password) = 0; |
| 105 }; | 90 }; |
| 106 | 91 |
| 107 } // namespace chromeos | 92 } // namespace chromeos |
| 108 | 93 |
| 109 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN
_ACTOR_H_ | 94 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN
_ACTOR_H_ |
| OLD | NEW |