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