| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
| 7 | 7 |
| 8 #include <IOKit/IOReturn.h> | 8 #include <IOKit/IOReturn.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 void ClassicDeviceAdded(IOBluetoothDevice* device); | 161 void ClassicDeviceAdded(IOBluetoothDevice* device); |
| 162 | 162 |
| 163 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: | 163 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: |
| 164 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, | 164 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, |
| 165 NSDictionary* advertisement_data, | 165 NSDictionary* advertisement_data, |
| 166 int rssi) override; | 166 int rssi) override; |
| 167 | 167 |
| 168 // Updates |devices_| when there is a change to the CBCentralManager's state. | 168 // Updates |devices_| when there is a change to the CBCentralManager's state. |
| 169 void LowEnergyCentralManagerUpdatedState(); | 169 void LowEnergyCentralManagerUpdatedState(); |
| 170 | 170 |
| 171 // Removes from |devices_| any previously paired, connected or seen devices | |
| 172 // which are no longer present. Notifies observers. | |
| 173 void RemoveTimedOutDevices(); | |
| 174 | |
| 175 // Updates |devices_| to include the currently paired devices and notifies | 171 // Updates |devices_| to include the currently paired devices and notifies |
| 176 // observers. | 172 // observers. |
| 177 void AddPairedDevices(); | 173 void AddPairedDevices(); |
| 178 | 174 |
| 179 // Returns the BLE device associated with the CoreBluetooth peripheral. | 175 // Returns the BLE device associated with the CoreBluetooth peripheral. |
| 180 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac( | 176 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac( |
| 181 CBPeripheral* peripheral); | 177 CBPeripheral* peripheral); |
| 182 | 178 |
| 183 std::string address_; | 179 std::string address_; |
| 184 std::string name_; | 180 std::string name_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 200 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 196 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
| 201 | 197 |
| 202 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; | 198 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
| 203 | 199 |
| 204 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); | 200 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |
| 205 }; | 201 }; |
| 206 | 202 |
| 207 } // namespace device | 203 } // namespace device |
| 208 | 204 |
| 209 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 205 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
| OLD | NEW |