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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.h

Issue 12929003: Implemented BluetoothAdapterMac::AddDevices(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted BluetoothDevice interface. Created 7 years, 9 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
Index: device/bluetooth/bluetooth_adapter_mac.h
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h
index 30857c728bf26b5d1dd177faca79fc555d8c4aba..8d646a3a9f3a3fff233fbe176e3d227791b26ed8 100644
--- a/device/bluetooth/bluetooth_adapter_mac.h
+++ b/device/bluetooth/bluetooth_adapter_mac.h
@@ -12,6 +12,12 @@
#include "base/observer_list.h"
#include "device/bluetooth/bluetooth_adapter.h"
+#ifdef __OBJC__
+@class NSArray;
+#else
+class NSArray;
+#endif
+
namespace base {
class SequencedTaskRunner;
@@ -59,6 +65,16 @@ class BluetoothAdapterMac : public BluetoothAdapter {
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);
+
bool powered_;
scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;

Powered by Google App Engine
This is Rietveld 408576698