Index: components/pairing/bluetooth_host_pairing_controller.h |
diff --git a/components/pairing/bluetooth_host_pairing_controller.h b/components/pairing/bluetooth_host_pairing_controller.h |
index 28311521510ebf48406965df136f16fd9edc3b99..b5ef979dad997de27098523eef4182981161eff9 100644 |
--- a/components/pairing/bluetooth_host_pairing_controller.h |
+++ b/components/pairing/bluetooth_host_pairing_controller.h |
@@ -17,6 +17,7 @@ |
#include "device/bluetooth/bluetooth_adapter.h" |
#include "device/bluetooth/bluetooth_device.h" |
#include "device/bluetooth/bluetooth_socket.h" |
+#include "device/hid/input_service_linux.h" |
namespace device { |
class BluetoothAdapter; |
@@ -34,9 +35,11 @@ class BluetoothHostPairingController |
public device::BluetoothAdapter::Observer, |
public device::BluetoothDevice::PairingDelegate { |
public: |
- typedef HostPairingController::Observer Observer; |
+ using Observer = HostPairingController::Observer; |
+ using InputDeviceInfo = device::InputServiceLinux::InputDeviceInfo; |
- BluetoothHostPairingController(); |
+ explicit BluetoothHostPairingController( |
+ const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); |
~BluetoothHostPairingController() override; |
private: |
@@ -61,6 +64,7 @@ class BluetoothHostPairingController |
void OnSendError(const std::string& error_message); |
void OnReceiveError(device::BluetoothSocket::ErrorReason reason, |
const std::string& error_message); |
+ void PowerOffAdapterIfApplicable(const std::vector<InputDeviceInfo>& devices); |
// HostPairingController: |
void AddObserver(Observer* observer) override; |
@@ -116,6 +120,7 @@ class BluetoothHostPairingController |
scoped_refptr<device::BluetoothSocket> controller_socket_; |
scoped_ptr<ProtoDecoder> proto_decoder_; |
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
base::ThreadChecker thread_checker_; |
base::ObserverList<Observer> observers_; |
base::WeakPtrFactory<BluetoothHostPairingController> ptr_factory_; |