Chromium Code Reviews| Index: device/bluetooth/bluetooth_adapter_mac.h |
| diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h |
| index c611e14be1768ea3f2ab3b59474da5fac463288d..999bdc7ad69858eefb32a94a793254fef38c54ff 100644 |
| --- a/device/bluetooth/bluetooth_adapter_mac.h |
| +++ b/device/bluetooth/bluetooth_adapter_mac.h |
| @@ -83,11 +83,6 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac |
| void ClassicDeviceFound(IOBluetoothDevice* device) override; |
| void ClassicDiscoveryStopped(bool unexpected) override; |
| - // BluetoothLowEnergyDiscoveryManagerMac::Observer override: |
| - void LowEnergyDeviceUpdated(CBPeripheral* peripheral, |
| - NSDictionary* advertisementData, |
| - int rssi) override; |
| - |
| // Registers that a new |device| has connected to the local host. |
| void DeviceConnected(IOBluetoothDevice* device); |
| @@ -125,10 +120,18 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac |
| // connected to the local host. |
| void ClassicDeviceAdded(IOBluetoothDevice* device); |
| - // Updates |devices_| to include the currently paired devices, as well as any |
| - // connected, but unpaired, devices. Notifies observers if any previously |
| - // paired or connected devices are no longer present. |
| - void UpdateDevices(); |
| + // BluetoothLowEnergyDiscoveryManagerMac::Observer override: |
| + void LowEnergyDeviceUpdated(CBPeripheral* peripheral, |
| + NSDictionary* advertisementData, |
| + int rssi) override; |
| + |
| + // Removes from |devices_| any previously paired, connected or seen devices |
| + // which are no longer present. Notifies observers. |
| + void RemoveTimedOutDevices(); |
| + |
| + // Updates |devices_| to include the currently paired devices and notifies |
| + // observers. |
| + void AddPairedDevices(); |
| std::string address_; |
| std::string name_; |
| @@ -145,6 +148,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac |
| scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
| + // The length of time that must elapse since the last Inquiry response (on |
| + // Classic devices) or call to BluetoothLowEnergyDevice::Update() (on Low |
| + // Energy) before a discovered device is considered to be no longer available. |
| + const static NSTimeInterval kDiscoveryTimeoutSec; |
|
armansito
2015/07/07 19:07:21
Move this above member variable declarations, per
krstnmnlsn
2015/07/07 21:58:01
Done.
|
| + |
| base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |