Chromium Code Reviews| Index: device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm |
| diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm |
| index 27f8902da2657bdcb32eb99e2946c70a678c16ff..882f1455aa80021d3fca7f6259188c49e097de6d 100644 |
| --- a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm |
| +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm |
| @@ -10,7 +10,7 @@ |
| #include "base/threading/thread_task_runner_handle.h" |
| #include "device/bluetooth/bluetooth_adapter_mac.h" |
| #include "device/bluetooth/bluetooth_device_mac.h" |
| -#include "device/bluetooth/bluetooth_gatt_notify_session_mac.h" |
| +#include "device/bluetooth/bluetooth_gatt_notify_session.h" |
| #include "device/bluetooth/bluetooth_remote_gatt_service_mac.h" |
| namespace device { |
| @@ -134,8 +134,8 @@ void BluetoothRemoteGattCharacteristicMac::StartNotifySession( |
| const ErrorCallback& error_callback) { |
| if (IsNotifying()) { |
| VLOG(2) << "Already notifying. Creating notify session."; |
| - std::unique_ptr<BluetoothGattNotifySessionMac> notify_session( |
| - new BluetoothGattNotifySessionMac(weak_ptr_factory_.GetWeakPtr())); |
| + std::unique_ptr<BluetoothGattNotifySession> notify_session( |
| + new BluetoothGattNotifySession(weak_ptr_factory_.GetWeakPtr())); |
| base::ThreadTaskRunnerHandle::Get()->PostTask( |
| FROM_HERE, |
| base::Bind(callback, base::Passed(std::move(notify_session)))); |
| @@ -164,6 +164,13 @@ void BluetoothRemoteGattCharacteristicMac::StartNotifySession( |
| start_notifications_in_progress_ = true; |
| } |
| +void BluetoothRemoteGattCharacteristicMac::StopNotifySession( |
| + BluetoothGattNotifySession* session, |
| + const base::Closure& callback) { |
| + NOTIMPLEMENTED(); |
|
ortuno
2016/08/19 19:13:27
Could you point to an issue to implement this?
tommyt
2016/08/22 06:34:12
Done.
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); |
| +} |
| + |
| void BluetoothRemoteGattCharacteristicMac::ReadRemoteCharacteristic( |
| const ValueCallback& callback, |
| const ErrorCallback& error_callback) { |
| @@ -223,6 +230,22 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic( |
| } |
| } |
| +void BluetoothRemoteGattCharacteristicMac::SubscribeToNotifications( |
| + BluetoothRemoteGattDescriptor* ccc_descriptor, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) { |
| + // TODO(http://crbug.com/633191): Implement this method |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void BluetoothRemoteGattCharacteristicMac::UnsubscribeFromNotifications( |
| + BluetoothRemoteGattDescriptor* ccc_descriptor, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) { |
| + // TODO(http://crbug.com/633191): Implement this method |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| void BluetoothRemoteGattCharacteristicMac::DidUpdateValue(NSError* error) { |
| // This method is called when the characteristic is read and when a |
| // notification is received. |
| @@ -306,7 +329,7 @@ void BluetoothRemoteGattCharacteristicMac::DidUpdateNotificationState( |
| return; |
| } |
| for (const auto& callback : reentrant_safe_callbacks) { |
| - callback.first.Run(base::MakeUnique<BluetoothGattNotifySessionMac>( |
| + callback.first.Run(base::MakeUnique<BluetoothGattNotifySession>( |
| weak_ptr_factory_.GetWeakPtr())); |
| } |
| } |