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

Unified Diff: device/bluetooth/bluetooth_device_android.h

Issue 1394973003: bluetooth: android: Create BluetoothRemoteGattServiceAndroid objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-renames-
Patch Set: Address ortuno 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_android.h ('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 627df052b4092d5cf3517d20b2d3af69a895c788..e830e94bf6d6bb8bc6ab9e223d08c9ce7394a21c 100644
--- a/device/bluetooth/bluetooth_device_android.h
+++ b/device/bluetooth/bluetooth_device_android.h
@@ -7,12 +7,11 @@
#include "base/android/jni_android.h"
#include "base/memory/weak_ptr.h"
+#include "device/bluetooth/bluetooth_adapter_android.h"
#include "device/bluetooth/bluetooth_device.h"
namespace device {
-class BluetoothAdapterAndroid;
-
// BluetoothDeviceAndroid along with the Java class
// org.chromium.device.bluetooth.ChromeBluetoothDevice implement
// BluetoothDevice.
@@ -39,6 +38,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceAndroid final
// Returns the associated ChromeBluetoothDevice Java object.
base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
+ // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid.
+ BluetoothAdapterAndroid* GetAdapter() {
+ return static_cast<BluetoothAdapterAndroid*>(adapter_);
+ }
+
// Updates cached copy of advertised UUIDs discovered during a scan.
// Returns true if new UUIDs differed from cached values.
bool UpdateAdvertisedUUIDs(
@@ -90,6 +94,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceAndroid final
int32_t status,
bool connected);
+ // Creates Bluetooth GATT service objects and adds them to
+ // BluetoothDevice::gatt_services_ if they are not already there.
+ void CreateGattRemoteService(
+ JNIEnv* env,
+ jobject caller,
+ int32_t instanceId,
+ jobject bluetooth_gatt_service_wrapper); // Java Type:
+ // BluetoothGattServiceWrapper
+
protected:
BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter);
« no previous file with comments | « device/bluetooth/bluetooth_adapter_android.h ('k') | device/bluetooth/bluetooth_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698