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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_android.h

Issue 1583583003: bluetooth: android: Implement characteristic GetService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-descriptors-
Patch Set: Created 4 years, 11 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_remote_gatt_characteristic_android.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
index 663ed4a32d005f7c66d11620ecd06c7d04b38b11..f57521764eeab730afd24255fb41b5d1777577c2 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
@@ -16,6 +16,7 @@ namespace device {
class BluetoothAdapterAndroid;
class BluetoothRemoteGattDescriptorAndroid;
+class BluetoothRemoteGattServiceAndroid;
// BluetoothRemoteGattCharacteristicAndroid along with its owned Java class
// org.chromium.device.bluetooth.ChromeBluetoothRemoteGattCharacteristic
@@ -36,6 +37,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
// to |bluetooth_gatt_characteristic_wrapper|.
static scoped_ptr<BluetoothRemoteGattCharacteristicAndroid> Create(
BluetoothAdapterAndroid* adapter,
+ BluetoothRemoteGattServiceAndroid* service,
const std::string& instance_id,
jobject /* BluetoothGattCharacteristicWrapper */
bluetooth_gatt_characteristic_wrapper,
@@ -96,15 +98,18 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
chrome_bluetooth_characteristic);
private:
- BluetoothRemoteGattCharacteristicAndroid(BluetoothAdapterAndroid* adapter,
- const std::string& instance_id);
+ BluetoothRemoteGattCharacteristicAndroid(
+ BluetoothAdapterAndroid* adapter,
+ BluetoothRemoteGattServiceAndroid* service,
+ const std::string& instance_id);
// Populates |descriptors_| from Java objects if necessary.
void EnsureDescriptorsCreated() const;
- // The adapter associated with this service. It's ok to store a raw pointer
- // here since |adapter_| indirectly owns this instance.
+ // The adapter and service associated with this characteristic. It's ok to
+ // store a raw pointers here since they indirectly own this instance.
BluetoothAdapterAndroid* adapter_;
+ BluetoothRemoteGattServiceAndroid* service_;
// Java object
// org.chromium.device.bluetooth.ChromeBluetoothRemoteGattCharacteristic.

Powered by Google App Engine
This is Rietveld 408576698