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