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

Unified Diff: device/bluetooth/bluetooth_device_mac.h

Issue 12929003: Implemented BluetoothAdapterMac::AddDevices(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_device_mac.h
diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h
index 105de1ce0ea848de5f0aee93a080163618ec2043..ae6d995aad398b3f6798eced4b336056a606d020 100644
--- a/device/bluetooth/bluetooth_device_mac.h
+++ b/device/bluetooth/bluetooth_device_mac.h
@@ -10,13 +10,21 @@
#include "base/basictypes.h"
#include "device/bluetooth/bluetooth_device.h"
+#ifdef __OBJC__
+@class IOBluetoothDevice;
+#else
+class IOBluetoothDevice;
+#endif
+
namespace device {
class BluetoothDeviceMac : public BluetoothDevice {
public:
- BluetoothDeviceMac();
+ BluetoothDeviceMac(const IOBluetoothDevice* device);
Mark Mentovai 2013/03/19 16:04:35 This constructor must be explicit now that you’re
youngki 2013/03/19 19:04:55 Done.
virtual ~BluetoothDeviceMac();
+ void SetVisible(bool visible);
Mark Mentovai 2013/03/19 16:04:35 Shouldn’t this be private? You only need to call t
youngki 2013/03/19 19:04:55 Removed this function since it is no longer necess
+
// BluetoothDevice override
virtual bool IsPaired() const OVERRIDE;
virtual const ServiceList& GetServices() const OVERRIDE;
@@ -54,6 +62,18 @@ class BluetoothDeviceMac : public BluetoothDevice {
const ErrorCallback& error_callback) OVERRIDE;
private:
+ friend class BluetoothAdapterMac;
+
+ // Computes the fingerprint that can be used to compare the devices.
+ static uint32 ComputeDeviceFingerprint(const IOBluetoothDevice* device);
+
+ uint32 device_fingerprint() const {
+ return device_fingerprint_;
+ }
+
+ // Used to compare the devices.
+ const uint32 device_fingerprint_;
+
DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac);
};

Powered by Google App Engine
This is Rietveld 408576698