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

Unified Diff: device/bluetooth/bluetooth_low_energy_device_mac.h

Issue 1211013005: Added class BluetoothDeviceMac, returns mac device timing data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pre-hash
Patch Set: adding a retain Created 5 years, 6 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_low_energy_device_mac.h
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.h b/device/bluetooth/bluetooth_low_energy_device_mac.h
index 5fa43355c83eb3967560df43b9edb3a41d1e7e13..d8d62efc4d276da29463a10ac7d40eb9e5e7789e 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.h
@@ -13,13 +13,13 @@
#include "base/mac/scoped_nsobject.h"
#include "base/mac/sdk_forward_declarations.h"
-#include "device/bluetooth/bluetooth_device.h"
+#include "device/bluetooth/bluetooth_device_mac.h"
namespace device {
class BluetoothLowEnergyDiscoverManagerMac;
-class BluetoothLowEnergyDeviceMac : public BluetoothDevice {
+class BluetoothLowEnergyDeviceMac : public BluetoothDeviceMac {
public:
BluetoothLowEnergyDeviceMac(CBPeripheral* peripheral,
NSDictionary* advertisementData,
@@ -70,6 +70,9 @@ class BluetoothLowEnergyDeviceMac : public BluetoothDevice {
const GattConnectionCallback& callback,
const ConnectErrorCallback& error_callback) override;
+ // BluetoothDeviceMac override.
+ NSDate* GetLastUpdateTime() const override;
+
protected:
// BluetoothDevice override.
std::string GetDeviceName() const override;
@@ -93,6 +96,9 @@ class BluetoothLowEnergyDeviceMac : public BluetoothDevice {
// Whether the device is connectable.
bool connectable_;
+ // Stores the time of the most recent call to Update().
+ base::scoped_nsobject<NSDate> last_update_time_;
+
DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
};

Powered by Google App Engine
This is Rietveld 408576698