| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/screens/hid_detection_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/hid_detection_screen.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 bt_devices.begin(); | 526 bt_devices.begin(); |
| 527 it != bt_devices.end() && | 527 it != bt_devices.end() && |
| 528 (keyboard_device_id_.empty() || pointing_device_id_.empty()); | 528 (keyboard_device_id_.empty() || pointing_device_id_.empty()); |
| 529 ++it) { | 529 ++it) { |
| 530 TryPairingAsPointingDevice(*it); | 530 TryPairingAsPointingDevice(*it); |
| 531 TryPairingAsKeyboardDevice(*it); | 531 TryPairingAsKeyboardDevice(*it); |
| 532 } | 532 } |
| 533 } | 533 } |
| 534 | 534 |
| 535 void HIDDetectionScreen::OnStartDiscoverySession( | 535 void HIDDetectionScreen::OnStartDiscoverySession( |
| 536 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { | 536 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) { |
| 537 VLOG(1) << "BT Discovery session started"; | 537 VLOG(1) << "BT Discovery session started"; |
| 538 discovery_session_ = std::move(discovery_session); | 538 discovery_session_ = std::move(discovery_session); |
| 539 UpdateDevices(); | 539 UpdateDevices(); |
| 540 } | 540 } |
| 541 | 541 |
| 542 void HIDDetectionScreen::SetPoweredError() { | 542 void HIDDetectionScreen::SetPoweredError() { |
| 543 LOG(ERROR) << "Failed to power BT adapter"; | 543 LOG(ERROR) << "Failed to power BT adapter"; |
| 544 } | 544 } |
| 545 | 545 |
| 546 void HIDDetectionScreen::SetPoweredOffError() { | 546 void HIDDetectionScreen::SetPoweredOffError() { |
| 547 LOG(ERROR) << "Failed to power off BT adapter"; | 547 LOG(ERROR) << "Failed to power off BT adapter"; |
| 548 } | 548 } |
| 549 | 549 |
| 550 void HIDDetectionScreen::FindDevicesError() { | 550 void HIDDetectionScreen::FindDevicesError() { |
| 551 VLOG(1) << "Failed to start Bluetooth discovery."; | 551 VLOG(1) << "Failed to start Bluetooth discovery."; |
| 552 } | 552 } |
| 553 | 553 |
| 554 | 554 |
| 555 } // namespace chromeos | 555 } // namespace chromeos |
| OLD | NEW |