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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_service_android.h

Issue 1411183003: bluetooth: android: Clean up BluetoothRemoteGattServiceAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-getid-
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
Index: device/bluetooth/bluetooth_remote_gatt_service_android.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_android.h b/device/bluetooth/bluetooth_remote_gatt_service_android.h
index a8f1294a5329e4ac2a51fd6d535a940ef5faf73b..c3fc5c8f30ee63b57e44f50e5d016101efaa0d4f 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_android.h
@@ -28,20 +28,19 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattServiceAndroid
public:
// Create a BluetoothRemoteGattServiceAndroid instance and associated Java
// ChromeBluetoothRemoteGattService using the provided
- // |bluetooth_remote_gatt_service_wrapper|.
+ // |bluetooth_gatt_service_wrapper|.
//
// The ChromeBluetoothRemoteGattService instance will hold a Java reference
- // to |bluetooth_remote_gatt_service_wrapper|.
- //
- // TODO(scheib): Return a scoped_ptr<>, but then device will need to handle
- // this correctly. http://crbug.com/506416
- static BluetoothRemoteGattServiceAndroid* Create(
+ // to |bluetooth_gatt_service_wrapper|.
+ static scoped_ptr<BluetoothRemoteGattServiceAndroid> Create(
BluetoothAdapterAndroid* adapter,
BluetoothDeviceAndroid* device,
- jobject bluetooth_remote_gatt_service_wrapper, // Java Type:
- // BluetoothRemoteGattServiceWrapper
+ jobject /* BluetoothRemoteGattServiceWrapper */
+ bluetooth_gatt_service_wrapper,
const std::string& instanceId);
+ ~BluetoothRemoteGattServiceAndroid() override;
+
// Register C++ methods exposed to Java using JNI.
static bool RegisterJNI(JNIEnv* env);
@@ -78,12 +77,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattServiceAndroid
bluetooth_gatt_characteristic_wrapper);
private:
- friend class BluetoothDeviceAndroid;
-
BluetoothRemoteGattServiceAndroid(BluetoothAdapterAndroid* adapter,
BluetoothDeviceAndroid* device,
const std::string& instanceId);
- ~BluetoothRemoteGattServiceAndroid() override;
// Populates |characteristics_| from Java objects if necessary.
void EnsureCharacteristicsCreated() const;
« no previous file with comments | « device/bluetooth/bluetooth_device_android.cc ('k') | device/bluetooth/bluetooth_remote_gatt_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698