| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 #include "chromeos/chromeos_switches.h" | 67 #include "chromeos/chromeos_switches.h" |
| 68 #include "chromeos/dbus/dbus_thread_manager.h" | 68 #include "chromeos/dbus/dbus_thread_manager.h" |
| 69 #include "chromeos/dbus/session_manager_client.h" | 69 #include "chromeos/dbus/session_manager_client.h" |
| 70 #include "chromeos/network/network_state.h" | 70 #include "chromeos/network/network_state.h" |
| 71 #include "chromeos/network/network_state_handler.h" | 71 #include "chromeos/network/network_state_handler.h" |
| 72 #include "chromeos/network/portal_detector/network_portal_detector.h" | 72 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 73 #include "chromeos/settings/cros_settings_names.h" | 73 #include "chromeos/settings/cros_settings_names.h" |
| 74 #include "chromeos/settings/timezone_settings.h" | 74 #include "chromeos/settings/timezone_settings.h" |
| 75 #include "components/crash/app/breakpad_linux.h" | 75 #include "components/crash/app/breakpad_linux.h" |
| 76 #include "components/pairing/bluetooth_controller_pairing_controller.h" | 76 #include "components/pairing/bluetooth_controller_pairing_controller.h" |
| 77 #include "components/pairing/bluetooth_host_pairing_controller.h" |
| 77 #include "components/user_manager/user_manager.h" | 78 #include "components/user_manager/user_manager.h" |
| 78 #include "content/public/browser/browser_thread.h" | 79 #include "content/public/browser/browser_thread.h" |
| 79 #include "content/public/browser/notification_types.h" | 80 #include "content/public/browser/notification_types.h" |
| 80 #include "ui/base/accelerators/accelerator.h" | 81 #include "ui/base/accelerators/accelerator.h" |
| 81 | 82 |
| 82 using content::BrowserThread; | 83 using content::BrowserThread; |
| 83 | 84 |
| 84 namespace { | 85 namespace { |
| 85 // If reboot didn't happen, ask user to reboot device manually. | 86 // If reboot didn't happen, ask user to reboot device manually. |
| 86 const int kWaitForRebootTimeSec = 3; | 87 const int kWaitForRebootTimeSec = 3; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 this, oobe_display_->GetAutoEnrollmentCheckScreenActor()); | 324 this, oobe_display_->GetAutoEnrollmentCheckScreenActor()); |
| 324 } else if (screen_name == kControllerPairingScreenName) { | 325 } else if (screen_name == kControllerPairingScreenName) { |
| 325 if (!controller_pairing_controller_) { | 326 if (!controller_pairing_controller_) { |
| 326 controller_pairing_controller_.reset( | 327 controller_pairing_controller_.reset( |
| 327 new pairing_chromeos::BluetoothControllerPairingController()); | 328 new pairing_chromeos::BluetoothControllerPairingController()); |
| 328 } | 329 } |
| 329 return new ControllerPairingScreen( | 330 return new ControllerPairingScreen( |
| 330 this, oobe_display_->GetControllerPairingScreenActor(), | 331 this, oobe_display_->GetControllerPairingScreenActor(), |
| 331 controller_pairing_controller_.get()); | 332 controller_pairing_controller_.get()); |
| 332 } else if (screen_name == kHostPairingScreenName) { | 333 } else if (screen_name == kHostPairingScreenName) { |
| 334 if (!host_pairing_controller_) { |
| 335 host_pairing_controller_.reset( |
| 336 new pairing_chromeos::BluetoothHostPairingController()); |
| 337 } |
| 333 return new HostPairingScreen(this, | 338 return new HostPairingScreen(this, |
| 334 oobe_display_->GetHostPairingScreenActor()); | 339 oobe_display_->GetHostPairingScreenActor(), |
| 340 host_pairing_controller_.get()); |
| 335 } | 341 } |
| 336 return NULL; | 342 return NULL; |
| 337 } | 343 } |
| 338 | 344 |
| 339 void WizardController::ShowNetworkScreen() { | 345 void WizardController::ShowNetworkScreen() { |
| 340 VLOG(1) << "Showing network screen."; | 346 VLOG(1) << "Showing network screen."; |
| 341 // Hide the status area initially; it only appears after OOBE first animates | 347 // Hide the status area initially; it only appears after OOBE first animates |
| 342 // in. Keep it visible if the user goes back to the existing network screen. | 348 // in. Keep it visible if the user goes back to the existing network screen. |
| 343 SetStatusAreaVisible(HasScreen(kNetworkScreenName)); | 349 SetStatusAreaVisible(HasScreen(kNetworkScreenName)); |
| 344 SetCurrentScreen(GetScreen(kNetworkScreenName)); | 350 SetCurrentScreen(GetScreen(kNetworkScreenName)); |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 if (ShouldAutoStartEnrollment() || ShouldRecoverEnrollment()) { | 1222 if (ShouldAutoStartEnrollment() || ShouldRecoverEnrollment()) { |
| 1217 StartupUtils::MarkEulaAccepted(); | 1223 StartupUtils::MarkEulaAccepted(); |
| 1218 auth_token_ = token; | 1224 auth_token_ = token; |
| 1219 InitiateOOBEUpdate(); | 1225 InitiateOOBEUpdate(); |
| 1220 } else { | 1226 } else { |
| 1221 LOG(WARNING) << "Not in device enrollment."; | 1227 LOG(WARNING) << "Not in device enrollment."; |
| 1222 } | 1228 } |
| 1223 } | 1229 } |
| 1224 | 1230 |
| 1225 } // namespace chromeos | 1231 } // namespace chromeos |
| OLD | NEW |