| 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_ENROLLMENT_SCREEN_ACTOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_ACTOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_ACTOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_ACTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.
h" | 10 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.
h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // something happens on the UI. | 25 // something happens on the UI. |
| 26 class Controller { | 26 class Controller { |
| 27 public: | 27 public: |
| 28 virtual ~Controller() {} | 28 virtual ~Controller() {} |
| 29 | 29 |
| 30 virtual void OnLoginDone(const std::string& user, | 30 virtual void OnLoginDone(const std::string& user, |
| 31 const std::string& auth_code) = 0; | 31 const std::string& auth_code) = 0; |
| 32 virtual void OnRetry() = 0; | 32 virtual void OnRetry() = 0; |
| 33 virtual void OnCancel() = 0; | 33 virtual void OnCancel() = 0; |
| 34 virtual void OnConfirmationClosed() = 0; | 34 virtual void OnConfirmationClosed() = 0; |
| 35 virtual void OnADJoined(const std::string& realm) = 0; |
| 35 virtual void OnDeviceAttributeProvided(const std::string& asset_id, | 36 virtual void OnDeviceAttributeProvided(const std::string& asset_id, |
| 36 const std::string& location) = 0; | 37 const std::string& location) = 0; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 virtual ~EnrollmentScreenActor() {} | 40 virtual ~EnrollmentScreenActor() {} |
| 40 | 41 |
| 41 // Initializes the actor with parameters. | 42 // Initializes the actor with parameters. |
| 42 virtual void SetParameters(Controller* controller, | 43 virtual void SetParameters(Controller* controller, |
| 43 const policy::EnrollmentConfig& config) = 0; | 44 const policy::EnrollmentConfig& config) = 0; |
| 44 | 45 |
| 45 // Prepare the contents to showing. | 46 // Prepare the contents to showing. |
| 46 virtual void PrepareToShow() = 0; | 47 virtual void PrepareToShow() = 0; |
| 47 | 48 |
| 48 // Shows the contents of the screen. | 49 // Shows the contents of the screen. |
| 49 virtual void Show() = 0; | 50 virtual void Show() = 0; |
| 50 | 51 |
| 51 // Hides the contents of the screen. | 52 // Hides the contents of the screen. |
| 52 virtual void Hide() = 0; | 53 virtual void Hide() = 0; |
| 53 | 54 |
| 54 // Shows the signin screen. | 55 // Shows the signin screen. |
| 55 virtual void ShowSigninScreen() = 0; | 56 virtual void ShowSigninScreen() = 0; |
| 56 | 57 |
| 58 // Shows the AD domain joining screen. |
| 59 virtual void ShowADJoin() = 0; |
| 60 |
| 57 // Shows the device attribute prompt screen. | 61 // Shows the device attribute prompt screen. |
| 58 virtual void ShowAttributePromptScreen(const std::string& asset_id, | 62 virtual void ShowAttributePromptScreen(const std::string& asset_id, |
| 59 const std::string& location) = 0; | 63 const std::string& location) = 0; |
| 60 | 64 |
| 61 // Shows a success string for attestation-based enrollment. | 65 // Shows a success string for attestation-based enrollment. |
| 62 virtual void ShowAttestationBasedEnrollmentSuccessScreen( | 66 virtual void ShowAttestationBasedEnrollmentSuccessScreen( |
| 63 const std::string& enterprise_domain) = 0; | 67 const std::string& enterprise_domain) = 0; |
| 64 | 68 |
| 65 // Shows the spinner screen for enrollment. | 69 // Shows the spinner screen for enrollment. |
| 66 virtual void ShowEnrollmentSpinnerScreen() = 0; | 70 virtual void ShowEnrollmentSpinnerScreen() = 0; |
| 67 | 71 |
| 68 // Show an authentication error. | 72 // Show an authentication error. |
| 69 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0; | 73 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0; |
| 70 | 74 |
| 71 // Show non-authentication error. | 75 // Show non-authentication error. |
| 72 virtual void ShowOtherError(EnterpriseEnrollmentHelper::OtherError error) = 0; | 76 virtual void ShowOtherError(EnterpriseEnrollmentHelper::OtherError error) = 0; |
| 73 | 77 |
| 74 // Update the UI to report the |status| of the enrollment procedure. | 78 // Update the UI to report the |status| of the enrollment procedure. |
| 75 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0; | 79 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0; |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace chromeos | 82 } // namespace chromeos |
| 79 | 83 |
| 80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_ACTOR_H_ | 84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_ACTOR_H_ |
| OLD | NEW |