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

Unified Diff: device/bluetooth/bluetooth_adapter_android.h

Issue 1215303006: bluetooth: android: Initial BluetoothDeviceAndroid implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-discovery-
Patch Set: jyasskin comments addressed. Pass UUIDs by array. Added more tests. Created 5 years, 5 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_adapter_android.h
diff --git a/device/bluetooth/bluetooth_adapter_android.h b/device/bluetooth/bluetooth_adapter_android.h
index 52e257d8c1f40d80f71db4ed868361e1112720b1..e41a71fc634f0b3b805117439b284fe1d80df57c 100644
--- a/device/bluetooth/bluetooth_adapter_android.h
+++ b/device/bluetooth/bluetooth_adapter_android.h
@@ -27,7 +27,9 @@ namespace device {
// technical reason they can not be supported should a need arrise.
//
// BluetoothAdapterAndroid is reference counted, and owns the lifetime of the
-// Java class BluetoothAdapter via j_adapter_.
+// Java class BluetoothAdapter via j_adapter_. The adapter also owns a tree of
+// additional C++ objects (Devices, Services, Characteristics, Descriptors),
+// with each C++ object owning its associated Java class.
class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final
: public BluetoothAdapter {
public:
@@ -81,7 +83,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final
const CreateAdvertisementErrorCallback& error_callback) override;
// Handles a scan error event by invalidating all discovery sessions.
- void OnScanFailed(JNIEnv* env, jobject obj);
+ void OnScanFailed(JNIEnv* env, jobject caller);
+
+ // Creates or updates device with advertised UUID information when a device is
+ // discovered during a scan.
+ void CreateOrUpdateDeviceOnScan(JNIEnv* env,
+ jobject caller,
+ const jstring& address,
+ jobject bluetooth_device_wrapper,
+ jobject advertised_uuids);
protected:
BluetoothAdapterAndroid();

Powered by Google App Engine
This is Rietveld 408576698