Index: device/bluetooth/bluetooth_adapter_mac.h |
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h |
index dc4b06b8e6e433b2dd7e89b264dfcd72be9d5bb4..088607616f3eadb0d3b1ed74408e005cf361a82c 100644 |
--- a/device/bluetooth/bluetooth_adapter_mac.h |
+++ b/device/bluetooth/bluetooth_adapter_mac.h |
@@ -21,11 +21,13 @@ |
@class IOBluetoothDevice; |
@class IOBluetoothDeviceInquiry; |
@class NSArray; |
+@class NSDate; |
#else |
class BluetoothAdapterMacDelegate; |
class IOBluetoothDevice; |
class IOBluetoothDeviceInquiry; |
class NSArray; |
+class NSDate; |
#endif |
namespace base { |
@@ -90,15 +92,8 @@ class BluetoothAdapterMac : public BluetoothAdapter { |
void InitForTest(scoped_refptr<base::SequencedTaskRunner> ui_task_runner); |
void PollAdapter(); |
- // Adds |devices| into |devices_| and notifies observers of the changes. |
- // |devices| is an array of pointers to discovered or paired |
- // |IOBluetoothDevice| objects. |
- void AddDevices(NSArray* devices); |
- |
- // Removes devices that used to be paired but are unpaired by the system from |
- // |devices_|. |
- // |devices| is an array of pointers to paired |IOBluetoothDevice| objects. |
- void RemoveUnpairedDevices(NSArray* paired_devices); |
+ // Updates |devices_| to be consistent with |devices|. |
+ void UpdateDevices(NSArray* devices); |
void MaybeStartDeviceInquiry(); |
void MaybeStopDeviceInquiry(); |
@@ -125,6 +120,10 @@ class BluetoothAdapterMac : public BluetoothAdapter { |
// the discovery between consecutive inquiries. |
base::hash_set<std::string> discovered_devices_; |
+ // Timestamp for the recently accessed device. |
+ // Used to determine if |devices_| needs an update. |
+ NSDate* recently_accessed_device_timestamp_; |
+ |
scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
// List of observers interested in event notifications from us. |