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

Unified Diff: device/bluetooth/bluetooth_device.h

Issue 1284073002: bluetooth: Add adapter to BluetoothDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-drop-callback-
Patch Set: Updated patchset dependency Created 5 years, 4 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.h
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 09d179777ac7a088d1654151b8ffb7ff2857bf15..67948f800b92fb36ca8e046a080e3717b5652435 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -23,6 +23,7 @@ class BinaryValue;
namespace device {
+class BluetoothAdapter;
class BluetoothGattConnection;
class BluetoothGattService;
class BluetoothSocket;
@@ -430,7 +431,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;
@@ -442,6 +443,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;

Powered by Google App Engine
This is Rietveld 408576698