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

Unified Diff: device/bluetooth/bluetooth_device_android.h

Issue 1256313002: bluetooth: android: Implement & test CreateGattConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split tests up into smaller tests Created 5 years, 3 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
« no previous file with comments | « device/bluetooth/bluetooth_device.cc ('k') | device/bluetooth/bluetooth_device_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_android.h
diff --git a/device/bluetooth/bluetooth_device_android.h b/device/bluetooth/bluetooth_device_android.h
index e9e4a6bb7d8864b869d87a3e10f748a84329378b..627df052b4092d5cf3517d20b2d3af69a895c788 100644
--- a/device/bluetooth/bluetooth_device_android.h
+++ b/device/bluetooth/bluetooth_device_android.h
@@ -36,6 +36,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceAndroid final
// Register C++ methods exposed to Java using JNI.
static bool RegisterJNI(JNIEnv* env);
+ // Returns the associated ChromeBluetoothDevice Java object.
+ base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
+
// Updates cached copy of advertised UUIDs discovered during a scan.
// Returns true if new UUIDs differed from cached values.
bool UpdateAdvertisedUUIDs(
@@ -80,6 +83,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceAndroid final
const ConnectToServiceCallback& callback,
const ConnectToServiceErrorCallback& error_callback) override;
+ // Callback indicating when GATT client has connected/disconnected.
+ // See android.bluetooth.BluetoothGattCallback.onConnectionStateChange.
+ void OnConnectionStateChange(JNIEnv* env,
+ jobject jcaller,
+ int32_t status,
+ bool connected);
+
protected:
BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter);
« no previous file with comments | « device/bluetooth/bluetooth_device.cc ('k') | device/bluetooth/bluetooth_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698