| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 new pairing_chromeos::BluetoothControllerPairingController()); | 371 new pairing_chromeos::BluetoothControllerPairingController()); |
| 372 } | 372 } |
| 373 return new ControllerPairingScreen( | 373 return new ControllerPairingScreen( |
| 374 this, | 374 this, |
| 375 this, | 375 this, |
| 376 oobe_display_->GetControllerPairingScreenActor(), | 376 oobe_display_->GetControllerPairingScreenActor(), |
| 377 shark_controller_.get()); | 377 shark_controller_.get()); |
| 378 } else if (screen_name == kHostPairingScreenName) { | 378 } else if (screen_name == kHostPairingScreenName) { |
| 379 if (!remora_controller_) { | 379 if (!remora_controller_) { |
| 380 remora_controller_.reset( | 380 remora_controller_.reset( |
| 381 new pairing_chromeos::BluetoothHostPairingController()); | 381 new pairing_chromeos::BluetoothHostPairingController( |
| 382 BrowserThread::GetMessageLoopProxyForThread( |
| 383 BrowserThread::FILE))); |
| 382 remora_controller_->StartPairing(); | 384 remora_controller_->StartPairing(); |
| 383 } | 385 } |
| 384 return new HostPairingScreen(this, | 386 return new HostPairingScreen(this, |
| 385 this, | 387 this, |
| 386 oobe_display_->GetHostPairingScreenActor(), | 388 oobe_display_->GetHostPairingScreenActor(), |
| 387 remora_controller_.get()); | 389 remora_controller_.get()); |
| 388 } else if (screen_name == kDeviceDisabledScreenName) { | 390 } else if (screen_name == kDeviceDisabledScreenName) { |
| 389 return new DeviceDisabledScreen( | 391 return new DeviceDisabledScreen( |
| 390 this, oobe_display_->GetDeviceDisabledScreenActor()); | 392 this, oobe_display_->GetDeviceDisabledScreenActor()); |
| 391 } | 393 } |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 } | 1329 } |
| 1328 | 1330 |
| 1329 void WizardController::MaybeStartListeningForSharkConnection() { | 1331 void WizardController::MaybeStartListeningForSharkConnection() { |
| 1330 // We shouldn't be here if we are running pairing OOBE already. | 1332 // We shouldn't be here if we are running pairing OOBE already. |
| 1331 if (IsControllerDetected()) | 1333 if (IsControllerDetected()) |
| 1332 return; | 1334 return; |
| 1333 | 1335 |
| 1334 if (!shark_connection_listener_) { | 1336 if (!shark_connection_listener_) { |
| 1335 shark_connection_listener_.reset( | 1337 shark_connection_listener_.reset( |
| 1336 new pairing_chromeos::SharkConnectionListener( | 1338 new pairing_chromeos::SharkConnectionListener( |
| 1339 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 1337 base::Bind(&WizardController::OnSharkConnected, | 1340 base::Bind(&WizardController::OnSharkConnected, |
| 1338 weak_factory_.GetWeakPtr()))); | 1341 weak_factory_.GetWeakPtr()))); |
| 1339 } | 1342 } |
| 1340 } | 1343 } |
| 1341 | 1344 |
| 1342 void WizardController::OnSharkConnected( | 1345 void WizardController::OnSharkConnected( |
| 1343 scoped_ptr<pairing_chromeos::HostPairingController> remora_controller) { | 1346 scoped_ptr<pairing_chromeos::HostPairingController> remora_controller) { |
| 1344 VLOG(1) << "OnSharkConnected"; | 1347 VLOG(1) << "OnSharkConnected"; |
| 1345 remora_controller_ = std::move(remora_controller); | 1348 remora_controller_ = std::move(remora_controller); |
| 1346 base::MessageLoop::current()->DeleteSoon( | 1349 base::MessageLoop::current()->DeleteSoon( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1368 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; | 1371 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; |
| 1369 } | 1372 } |
| 1370 | 1373 |
| 1371 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1374 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
| 1372 screen->SetParameters(effective_config, shark_controller_.get()); | 1375 screen->SetParameters(effective_config, shark_controller_.get()); |
| 1373 SetStatusAreaVisible(true); | 1376 SetStatusAreaVisible(true); |
| 1374 SetCurrentScreen(screen); | 1377 SetCurrentScreen(screen); |
| 1375 } | 1378 } |
| 1376 | 1379 |
| 1377 } // namespace chromeos | 1380 } // namespace chromeos |
| OLD | NEW |