Index: device/bluetooth/bluetooth_device.h |
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h |
index 46f8a0576839d260d37f51976881d71c58aaf36a..5e1e6059d68536832a667295211077d07ed101f3 100644 |
--- a/device/bluetooth/bluetooth_device.h |
+++ b/device/bluetooth/bluetooth_device.h |
@@ -22,6 +22,7 @@ class BinaryValue; |
namespace device { |
+class BluetoothAdapter; |
class BluetoothGattConnection; |
class BluetoothGattService; |
class BluetoothSocket; |
@@ -429,7 +430,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice { |
static std::string CanonicalizeAddress(const std::string& address); |
protected: |
- BluetoothDevice(); |
+ BluetoothDevice(BluetoothAdapter* adapter); |
// Returns the internal name of the Bluetooth device, used by GetName(). |
virtual std::string GetDeviceName() const = 0; |
@@ -441,6 +442,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice { |
void SetServiceData(BluetoothUUID serviceUUID, const char* buffer, |
size_t size); |
+ // Raw pointer to adapter owning this device object. Subclasses use platform |
+ // specific pointers via adapter_. |
+ BluetoothAdapter* adapter_; |
+ |
// Mapping from the platform-specific GATT service identifiers to |
// BluetoothGattService objects. |
typedef std::map<std::string, BluetoothGattService*> GattServiceMap; |