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

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: 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..8f24259390d12182c39ef97c77cf908856ebe34a 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_. A tree of additional C++ objects
Jeffrey Yasskin 2015/07/07 00:11:14 "The adapter also owns a tree of ..."
scheib 2015/07/08 00:49:10 Done.
+// (Devices, Services, Characteristics, Descriptors) are also owned, with each
+// C++ object owning its associated Java class.
class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final
: public BluetoothAdapter {
public:
@@ -83,6 +85,14 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final
// Handles a scan error event by invalidating all discovery sessions.
void OnScanFailed(JNIEnv* env, jobject obj);
+ // Creates or updates device with advertised UUID information when a device is
+ // discovered during a scan.
+ void CreateOrUpdateDeviceOnScan(JNIEnv* env,
+ jobject obj,
Jeffrey Yasskin 2015/07/07 00:11:14 What's |obj|? Maybe comment the expected types for
scheib 2015/07/08 00:49:10 The first two parameters are standard JNI form. I'
Jeffrey Yasskin 2015/07/08 17:19:38 Cool, thanks. Should bluetooth_device_wrapper and
scheib 2015/07/08 23:02:34 OK. /shrug/ this is a bit of a mess, and the C++ c
+ const jstring& address,
+ jobject bluetooth_device_wrapper,
+ jobject advertised_uuids);
+
protected:
BluetoothAdapterAndroid();
~BluetoothAdapterAndroid() override;

Powered by Google App Engine
This is Rietveld 408576698