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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 void ClassicDeviceAdded(IOBluetoothDevice* device); | 170 void ClassicDeviceAdded(IOBluetoothDevice* device); |
171 | 171 |
172 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: | 172 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: |
173 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, | 173 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, |
174 NSDictionary* advertisement_data, | 174 NSDictionary* advertisement_data, |
175 int rssi) override; | 175 int rssi) override; |
176 | 176 |
177 // Updates |devices_| when there is a change to the CBCentralManager's state. | 177 // Updates |devices_| when there is a change to the CBCentralManager's state. |
178 void LowEnergyCentralManagerUpdatedState(); | 178 void LowEnergyCentralManagerUpdatedState(); |
179 | 179 |
180 // Removes from |devices_| any previously paired, connected or seen devices | |
181 // which are no longer present. Notifies observers. | |
182 void RemoveTimedOutDevices(); | |
183 | |
184 // Updates |devices_| to include the currently paired devices and notifies | 180 // Updates |devices_| to include the currently paired devices and notifies |
185 // observers. | 181 // observers. |
186 void AddPairedDevices(); | 182 void AddPairedDevices(); |
187 | 183 |
188 // Returns the BLE device associated with the CoreBluetooth peripheral. | 184 // Returns the BLE device associated with the CoreBluetooth peripheral. |
189 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac( | 185 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac( |
190 CBPeripheral* peripheral); | 186 CBPeripheral* peripheral); |
191 | 187 |
192 std::string address_; | 188 std::string address_; |
193 std::string name_; | 189 std::string name_; |
(...skipping 15 matching lines...) Expand all Loading... |
209 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 205 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
210 | 206 |
211 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; | 207 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
212 | 208 |
213 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); | 209 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |
214 }; | 210 }; |
215 | 211 |
216 } // namespace device | 212 } // namespace device |
217 | 213 |
218 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 214 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
OLD | NEW |