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 #include "chrome/browser/chromeos/login/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 chromeos::UpdateScreen* result = | 297 chromeos::UpdateScreen* result = |
298 new chromeos::UpdateScreen(this, | 298 new chromeos::UpdateScreen(this, |
299 oobe_display_->GetUpdateScreenActor(), | 299 oobe_display_->GetUpdateScreenActor(), |
300 remora_controller_.get()); | 300 remora_controller_.get()); |
301 result->SetRebootCheckDelay(kWaitForRebootTimeSec); | 301 result->SetRebootCheckDelay(kWaitForRebootTimeSec); |
302 return result; | 302 return result; |
303 } else if (screen_name == kUserImageScreenName) { | 303 } else if (screen_name == kUserImageScreenName) { |
304 return new chromeos::UserImageScreen( | 304 return new chromeos::UserImageScreen( |
305 this, oobe_display_->GetUserImageScreenActor()); | 305 this, oobe_display_->GetUserImageScreenActor()); |
306 } else if (screen_name == kEulaScreenName) { | 306 } else if (screen_name == kEulaScreenName) { |
307 return new chromeos::EulaScreen(this, oobe_display_->GetEulaScreenActor()); | 307 scoped_ptr<chromeos::EulaScreen> screen( |
| 308 new chromeos::EulaScreen(this, oobe_display_->GetEulaScreenActor())); |
| 309 screen->SetDelegate(this); |
| 310 return screen.release(); |
308 } else if (screen_name == kEnrollmentScreenName) { | 311 } else if (screen_name == kEnrollmentScreenName) { |
309 return new chromeos::EnrollmentScreen( | 312 return new chromeos::EnrollmentScreen( |
310 this, oobe_display_->GetEnrollmentScreenActor()); | 313 this, oobe_display_->GetEnrollmentScreenActor()); |
311 } else if (screen_name == kResetScreenName) { | 314 } else if (screen_name == kResetScreenName) { |
312 return new chromeos::ResetScreen(this, | 315 return new chromeos::ResetScreen(this, |
313 oobe_display_->GetResetScreenActor()); | 316 oobe_display_->GetResetScreenActor()); |
314 } else if (screen_name == kKioskEnableScreenName) { | 317 } else if (screen_name == kKioskEnableScreenName) { |
315 return new chromeos::KioskEnableScreen( | 318 return new chromeos::KioskEnableScreen( |
316 this, oobe_display_->GetKioskEnableScreenActor()); | 319 this, oobe_display_->GetKioskEnableScreenActor()); |
317 } else if (screen_name == kKioskAutolaunchScreenName) { | 320 } else if (screen_name == kKioskAutolaunchScreenName) { |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 NOTREACHED(); | 1018 NOTREACHED(); |
1016 } | 1019 } |
1017 } | 1020 } |
1018 | 1021 |
1019 void WizardController::OnSetUserNamePassword(const std::string& username, | 1022 void WizardController::OnSetUserNamePassword(const std::string& username, |
1020 const std::string& password) { | 1023 const std::string& password) { |
1021 username_ = username; | 1024 username_ = username; |
1022 password_ = password; | 1025 password_ = password; |
1023 } | 1026 } |
1024 | 1027 |
1025 void WizardController::SetUsageStatisticsReporting(bool val) { | |
1026 usage_statistics_reporting_ = val; | |
1027 } | |
1028 | |
1029 bool WizardController::GetUsageStatisticsReporting() const { | |
1030 return usage_statistics_reporting_; | |
1031 } | |
1032 | |
1033 void WizardController::ShowErrorScreen() { | 1028 void WizardController::ShowErrorScreen() { |
1034 VLOG(1) << "Showing error screen."; | 1029 VLOG(1) << "Showing error screen."; |
1035 SetCurrentScreen(GetScreen(kErrorScreenName)); | 1030 SetCurrentScreen(GetScreen(kErrorScreenName)); |
1036 } | 1031 } |
1037 | 1032 |
1038 void WizardController::HideErrorScreen(BaseScreen* parent_screen) { | 1033 void WizardController::HideErrorScreen(BaseScreen* parent_screen) { |
1039 DCHECK(parent_screen); | 1034 DCHECK(parent_screen); |
1040 VLOG(1) << "Hiding error screen."; | 1035 VLOG(1) << "Hiding error screen."; |
1041 SetCurrentScreen(parent_screen); | 1036 SetCurrentScreen(parent_screen); |
1042 } | 1037 } |
1043 | 1038 |
| 1039 void WizardController::SetUsageStatisticsReporting(bool val) { |
| 1040 usage_statistics_reporting_ = val; |
| 1041 } |
| 1042 |
| 1043 bool WizardController::GetUsageStatisticsReporting() const { |
| 1044 return usage_statistics_reporting_; |
| 1045 } |
| 1046 |
1044 void WizardController::OnAccessibilityStatusChanged( | 1047 void WizardController::OnAccessibilityStatusChanged( |
1045 const AccessibilityStatusEventDetails& details) { | 1048 const AccessibilityStatusEventDetails& details) { |
1046 enum AccessibilityNotificationType type = details.notification_type; | 1049 enum AccessibilityNotificationType type = details.notification_type; |
1047 if (type == ACCESSIBILITY_MANAGER_SHUTDOWN) { | 1050 if (type == ACCESSIBILITY_MANAGER_SHUTDOWN) { |
1048 accessibility_subscription_.reset(); | 1051 accessibility_subscription_.reset(); |
1049 return; | 1052 return; |
1050 } else if (type != ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK || !details.enabled) { | 1053 } else if (type != ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK || !details.enabled) { |
1051 return; | 1054 return; |
1052 } | 1055 } |
1053 | 1056 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 if (accepted_eula) // Always true. | 1302 if (accepted_eula) // Always true. |
1300 StartupUtils::MarkEulaAccepted(); | 1303 StartupUtils::MarkEulaAccepted(); |
1301 SetUsageStatisticsReporting(send_reports); | 1304 SetUsageStatisticsReporting(send_reports); |
1302 NetworkScreenActor* network_actor = oobe_display_->GetNetworkScreenActor(); | 1305 NetworkScreenActor* network_actor = oobe_display_->GetNetworkScreenActor(); |
1303 network_actor->SetApplicationLocale(lang); | 1306 network_actor->SetApplicationLocale(lang); |
1304 network_actor->SetTimezone(timezone); | 1307 network_actor->SetTimezone(timezone); |
1305 network_actor->SetInputMethod(keyboard_layout); | 1308 network_actor->SetInputMethod(keyboard_layout); |
1306 } | 1309 } |
1307 | 1310 |
1308 } // namespace chromeos | 1311 } // namespace chromeos |
OLD | NEW |