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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_android.h

Issue 1422093002: bluetooth: android: BluetoothRemoteGattCharacteristicAndroid::GetUUID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-cleanup-
Patch Set: Created 5 years, 2 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 7414977c543d5e400597e2e06c2b579a988f1603..a97160fcf348e3e651e89266063774f43ed7b488 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
@@ -5,6 +5,7 @@
#ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_
#define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_
+#include "base/android/jni_android.h"
#include "base/macros.h"
#include "device/bluetooth/bluetooth_gatt_characteristic.h"
@@ -16,19 +17,24 @@ namespace device {
class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
: public BluetoothGattCharacteristic {
public:
- // Create a BluetoothRemoteGattServiceAndroid instance and associated Java
- // ChromeBluetoothRemoteGattService using the provided
- // |bluetooth_remote_gatt_service_wrapper|.
+ // Create a BluetoothRemoteGattCharacteristicAndroid instance and associated
+ // Java
+ // ChromeBluetoothRemoteGattCharacteristic using the provided
+ // |bluetooth_gatt_characteristic_wrapper|.
//
- // The ChromeBluetoothRemoteGattService instance will hold a Java reference
- // to |bluetooth_remote_gatt_service_wrapper|.
- //
- // TODO(scheib): Actually create the Java object. crbug.com/545682
+ // The ChromeBluetoothRemoteGattCharacteristic instance will hold a Java
+ // reference
+ // to |bluetooth_gatt_characteristic_wrapper|.
static scoped_ptr<BluetoothRemoteGattCharacteristicAndroid> Create(
- const std::string& instanceId);
+ const std::string& instanceId,
+ jobject /* BluetoothGattCharacteristicWrapper */
+ bluetooth_gatt_characteristic_wrapper);
~BluetoothRemoteGattCharacteristicAndroid() override;
+ // Register C++ methods exposed to Java using JNI.
+ static bool RegisterJNI(JNIEnv* env);
+
// BluetoothGattCharacteristic interface:
std::string GetIdentifier() const override;
BluetoothUUID GetUUID() const override;
@@ -54,6 +60,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
private:
BluetoothRemoteGattCharacteristicAndroid(const std::string& instanceId);
+ // Java object
+ // org.chromium.device.bluetooth.ChromeBluetoothRemoteGattCharacteristic.
+ base::android::ScopedJavaGlobalRef<jobject> j_characteristic_;
+
// Adapter unique instance ID.
std::string instanceId_;

Powered by Google App Engine
This is Rietveld 408576698