| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 shark_controller_.reset( | 378 shark_controller_.reset( |
| 379 new pairing_chromeos::BluetoothControllerPairingController()); | 379 new pairing_chromeos::BluetoothControllerPairingController()); |
| 380 } | 380 } |
| 381 return new ControllerPairingScreen( | 381 return new ControllerPairingScreen( |
| 382 this, this, oobe_ui_->GetControllerPairingScreenActor(), | 382 this, this, oobe_ui_->GetControllerPairingScreenActor(), |
| 383 shark_controller_.get()); | 383 shark_controller_.get()); |
| 384 } else if (screen_name == kHostPairingScreenName) { | 384 } else if (screen_name == kHostPairingScreenName) { |
| 385 if (!remora_controller_) { | 385 if (!remora_controller_) { |
| 386 remora_controller_.reset( | 386 remora_controller_.reset( |
| 387 new pairing_chromeos::BluetoothHostPairingController( | 387 new pairing_chromeos::BluetoothHostPairingController( |
| 388 BrowserThread::GetMessageLoopProxyForThread( | 388 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); |
| 389 BrowserThread::FILE))); | |
| 390 remora_controller_->StartPairing(); | 389 remora_controller_->StartPairing(); |
| 391 } | 390 } |
| 392 return new HostPairingScreen(this, this, | 391 return new HostPairingScreen(this, this, |
| 393 oobe_ui_->GetHostPairingScreenActor(), | 392 oobe_ui_->GetHostPairingScreenActor(), |
| 394 remora_controller_.get()); | 393 remora_controller_.get()); |
| 395 } else if (screen_name == kDeviceDisabledScreenName) { | 394 } else if (screen_name == kDeviceDisabledScreenName) { |
| 396 return new DeviceDisabledScreen(this, | 395 return new DeviceDisabledScreen(this, |
| 397 oobe_ui_->GetDeviceDisabledScreenActor()); | 396 oobe_ui_->GetDeviceDisabledScreenActor()); |
| 398 } | 397 } |
| 399 | 398 |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 } | 1346 } |
| 1348 | 1347 |
| 1349 void WizardController::MaybeStartListeningForSharkConnection() { | 1348 void WizardController::MaybeStartListeningForSharkConnection() { |
| 1350 // We shouldn't be here if we are running pairing OOBE already. | 1349 // We shouldn't be here if we are running pairing OOBE already. |
| 1351 if (IsControllerDetected()) | 1350 if (IsControllerDetected()) |
| 1352 return; | 1351 return; |
| 1353 | 1352 |
| 1354 if (!shark_connection_listener_) { | 1353 if (!shark_connection_listener_) { |
| 1355 shark_connection_listener_.reset( | 1354 shark_connection_listener_.reset( |
| 1356 new pairing_chromeos::SharkConnectionListener( | 1355 new pairing_chromeos::SharkConnectionListener( |
| 1357 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 1356 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
| 1358 base::Bind(&WizardController::OnSharkConnected, | 1357 base::Bind(&WizardController::OnSharkConnected, |
| 1359 weak_factory_.GetWeakPtr()))); | 1358 weak_factory_.GetWeakPtr()))); |
| 1360 } | 1359 } |
| 1361 } | 1360 } |
| 1362 | 1361 |
| 1363 void WizardController::OnSharkConnected( | 1362 void WizardController::OnSharkConnected( |
| 1364 std::unique_ptr<pairing_chromeos::HostPairingController> | 1363 std::unique_ptr<pairing_chromeos::HostPairingController> |
| 1365 remora_controller) { | 1364 remora_controller) { |
| 1366 VLOG(1) << "OnSharkConnected"; | 1365 VLOG(1) << "OnSharkConnected"; |
| 1367 remora_controller_ = std::move(remora_controller); | 1366 remora_controller_ = std::move(remora_controller); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1390 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; | 1389 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; |
| 1391 } | 1390 } |
| 1392 | 1391 |
| 1393 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1392 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
| 1394 screen->SetParameters(effective_config, shark_controller_.get()); | 1393 screen->SetParameters(effective_config, shark_controller_.get()); |
| 1395 SetStatusAreaVisible(true); | 1394 SetStatusAreaVisible(true); |
| 1396 SetCurrentScreen(screen); | 1395 SetCurrentScreen(screen); |
| 1397 } | 1396 } |
| 1398 | 1397 |
| 1399 } // namespace chromeos | 1398 } // namespace chromeos |
| OLD | NEW |