Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1383)

Unified Diff: device/bluetooth/bluetooth_adapter_mac.h

Issue 13862020: Simplified BluetoothAdapterMac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix space Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698