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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_android.h

Issue 2051333004: Implement BluetoothGattNotifySession::Stop on Android, 2nd attempt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error on windows Created 4 years, 4 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_characteristic_android.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
index eed5c4623c56eb9384a41c552d9f0aa8d0991be6..c0606b420c7ae2c6bf6adffeda5d320bd660faa4 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
@@ -61,25 +61,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
BluetoothRemoteGattService* GetService() const override;
Properties GetProperties() const override;
Permissions GetPermissions() const override;
- bool IsNotifying() const override;
std::vector<BluetoothRemoteGattDescriptor*> GetDescriptors() const override;
BluetoothRemoteGattDescriptor* GetDescriptor(
const std::string& identifier) const override;
- void StartNotifySession(const NotifySessionCallback& callback,
- const ErrorCallback& error_callback) override;
void ReadRemoteCharacteristic(const ValueCallback& callback,
const ErrorCallback& error_callback) override;
void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value,
const base::Closure& callback,
const ErrorCallback& error_callback) override;
- // Called when StartNotifySession operation succeeds.
- void OnStartNotifySessionSuccess();
-
- // Called when StartNotifySession operation fails.
- void OnStartNotifySessionError(
- BluetoothRemoteGattService::GattErrorCode error);
-
// Called when value changed event occurs.
void OnChanged(JNIEnv* env,
const base::android::JavaParamRef<jobject>& jcaller,
@@ -109,6 +99,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
jobject>& /* ChromeBluetoothCharacteristic */
chrome_bluetooth_characteristic);
+ protected:
+ void SubscribeToNotifications(BluetoothRemoteGattDescriptor* ccc_descriptor,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void UnsubscribeFromNotifications(
+ BluetoothRemoteGattDescriptor* ccc_descriptor,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+
private:
BluetoothRemoteGattCharacteristicAndroid(
BluetoothAdapterAndroid* adapter,
@@ -130,11 +129,6 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
// Adapter unique instance ID.
std::string instance_id_;
- // StartNotifySession callbacks and pending state.
- typedef std::pair<NotifySessionCallback, ErrorCallback>
- PendingStartNotifyCall;
- std::vector<PendingStartNotifyCall> pending_start_notify_calls_;
-
// ReadRemoteCharacteristic callbacks and pending state.
bool read_pending_ = false;
ValueCallback read_callback_;

Powered by Google App Engine
This is Rietveld 408576698