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_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void OnRetry() override; | 81 void OnRetry() override; |
82 void OnCancel() override; | 82 void OnCancel() override; |
83 void OnConfirmationClosed() override; | 83 void OnConfirmationClosed() override; |
84 | 84 |
85 // EnterpriseEnrollmentHelper::EnrollmentStatusConsumer implementation: | 85 // EnterpriseEnrollmentHelper::EnrollmentStatusConsumer implementation: |
86 void OnAuthError(const GoogleServiceAuthError& error) override; | 86 void OnAuthError(const GoogleServiceAuthError& error) override; |
87 void OnEnrollmentError(policy::EnrollmentStatus status) override; | 87 void OnEnrollmentError(policy::EnrollmentStatus status) override; |
88 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override; | 88 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override; |
89 void OnDeviceEnrolled(const std::string& additional_token) override; | 89 void OnDeviceEnrolled(const std::string& additional_token) override; |
90 | 90 |
| 91 void OnDeviceNaming(const std::string& asset_id, |
| 92 const std::string& location) override; |
91 // Used for testing. | 93 // Used for testing. |
92 EnrollmentScreenActor* GetActor() { | 94 EnrollmentScreenActor* GetActor() { |
93 return actor_; | 95 return actor_; |
94 } | 96 } |
95 | 97 |
96 private: | 98 private: |
97 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess); | 99 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess); |
98 | 100 |
99 // Creates an enrollment helper. | 101 // Creates an enrollment helper. |
100 void CreateEnrollmentHelper(); | 102 void CreateEnrollmentHelper(); |
(...skipping 13 matching lines...) Expand all Loading... |
114 // operations are completed. | 116 // operations are completed. |
115 void ShowEnrollmentStatusOnSuccess(); | 117 void ShowEnrollmentStatusOnSuccess(); |
116 | 118 |
117 // Logs an UMA event in one of the "Enrollment.*" histograms, depending on | 119 // Logs an UMA event in one of the "Enrollment.*" histograms, depending on |
118 // |enrollment_mode_|. | 120 // |enrollment_mode_|. |
119 void UMA(policy::MetricEnrollment sample); | 121 void UMA(policy::MetricEnrollment sample); |
120 | 122 |
121 // Shows the signin screen. Used as a callback to run after auth reset. | 123 // Shows the signin screen. Used as a callback to run after auth reset. |
122 void ShowSigninScreen(); | 124 void ShowSigninScreen(); |
123 | 125 |
| 126 // Shows the device naming screen. |
| 127 // Used as a callback to run after successful enrollment. |
| 128 void ShowDeviceNamingScreen(); |
| 129 |
| 130 void OnDeviceNamed(bool status); |
| 131 void OnDeviceNamingPermission(bool status); |
| 132 |
124 void OnAnyEnrollmentError(); | 133 void OnAnyEnrollmentError(); |
125 | 134 |
126 pairing_chromeos::ControllerPairingController* shark_controller_; | 135 pairing_chromeos::ControllerPairingController* shark_controller_; |
127 pairing_chromeos::HostPairingController* remora_controller_; | 136 pairing_chromeos::HostPairingController* remora_controller_; |
128 EnrollmentScreenActor* actor_; | 137 EnrollmentScreenActor* actor_; |
129 policy::EnrollmentConfig enrollment_config_; | 138 policy::EnrollmentConfig enrollment_config_; |
130 bool enrollment_failed_once_; | 139 bool enrollment_failed_once_; |
131 std::string enrolling_user_domain_; | 140 std::string enrolling_user_domain_; |
132 scoped_ptr<base::ElapsedTimer> elapsed_timer_; | 141 scoped_ptr<base::ElapsedTimer> elapsed_timer_; |
133 scoped_ptr<EnterpriseEnrollmentHelper> enrollment_helper_; | 142 scoped_ptr<EnterpriseEnrollmentHelper> enrollment_helper_; |
134 base::WeakPtrFactory<EnrollmentScreen> weak_ptr_factory_; | 143 base::WeakPtrFactory<EnrollmentScreen> weak_ptr_factory_; |
135 | 144 |
136 DISALLOW_COPY_AND_ASSIGN(EnrollmentScreen); | 145 DISALLOW_COPY_AND_ASSIGN(EnrollmentScreen); |
137 }; | 146 }; |
138 | 147 |
139 } // namespace chromeos | 148 } // namespace chromeos |
140 | 149 |
141 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ | 150 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ |
OLD | NEW |