| 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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_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" |
| 11 #include "chrome/browser/chromeos/login/oobe_screen.h" |
| 11 | 12 |
| 12 class GoogleServiceAuthError; | 13 class GoogleServiceAuthError; |
| 13 | 14 |
| 14 namespace policy { | 15 namespace policy { |
| 15 struct EnrollmentConfig; | 16 struct EnrollmentConfig; |
| 16 class EnrollmentStatus; | 17 class EnrollmentStatus; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace chromeos { | 20 namespace chromeos { |
| 20 | 21 |
| 21 // Interface class for the enterprise enrollment screen view. | 22 // Interface class for the enterprise enrollment screen view. |
| 22 class EnrollmentScreenView { | 23 class EnrollmentScreenView { |
| 23 public: | 24 public: |
| 24 // This defines the interface for controllers which will be called back when | 25 // This defines the interface for controllers which will be called back when |
| 25 // something happens on the UI. | 26 // something happens on the UI. |
| 26 class Controller { | 27 class Controller { |
| 27 public: | 28 public: |
| 28 virtual ~Controller() {} | 29 virtual ~Controller() {} |
| 29 | 30 |
| 30 virtual void OnLoginDone(const std::string& user, | 31 virtual void OnLoginDone(const std::string& user, |
| 31 const std::string& auth_code) = 0; | 32 const std::string& auth_code) = 0; |
| 32 virtual void OnRetry() = 0; | 33 virtual void OnRetry() = 0; |
| 33 virtual void OnCancel() = 0; | 34 virtual void OnCancel() = 0; |
| 34 virtual void OnConfirmationClosed() = 0; | 35 virtual void OnConfirmationClosed() = 0; |
| 35 virtual void OnAdJoined(const std::string& realm) = 0; | 36 virtual void OnAdJoined(const std::string& realm) = 0; |
| 36 virtual void OnDeviceAttributeProvided(const std::string& asset_id, | 37 virtual void OnDeviceAttributeProvided(const std::string& asset_id, |
| 37 const std::string& location) = 0; | 38 const std::string& location) = 0; |
| 38 }; | 39 }; |
| 39 | 40 |
| 41 constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_OOBE_ENROLLMENT; |
| 42 |
| 40 virtual ~EnrollmentScreenView() {} | 43 virtual ~EnrollmentScreenView() {} |
| 41 | 44 |
| 42 // Initializes the view with parameters. | 45 // Initializes the view with parameters. |
| 43 virtual void SetParameters(Controller* controller, | 46 virtual void SetParameters(Controller* controller, |
| 44 const policy::EnrollmentConfig& config) = 0; | 47 const policy::EnrollmentConfig& config) = 0; |
| 45 | 48 |
| 46 // Shows the contents of the screen. | 49 // Shows the contents of the screen. |
| 47 virtual void Show() = 0; | 50 virtual void Show() = 0; |
| 48 | 51 |
| 49 // Hides the contents of the screen. | 52 // Hides the contents of the screen. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 72 // Show non-authentication error. | 75 // Show non-authentication error. |
| 73 virtual void ShowOtherError(EnterpriseEnrollmentHelper::OtherError error) = 0; | 76 virtual void ShowOtherError(EnterpriseEnrollmentHelper::OtherError error) = 0; |
| 74 | 77 |
| 75 // Update the UI to report the |status| of the enrollment procedure. | 78 // Update the UI to report the |status| of the enrollment procedure. |
| 76 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0; | 79 virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) = 0; |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 } // namespace chromeos | 82 } // namespace chromeos |
| 80 | 83 |
| 81 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_ | 84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_VIEW_H_ |
| OLD | NEW |