Chromium Code Reviews| Index: device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc |
| diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc |
| index aec99968c82741c815827abe2ca6c946067be558..40e163a3a0320c1c33c5220704eb9d27c133039d 100644 |
| --- a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc |
| +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc |
| @@ -9,7 +9,7 @@ |
| #include "base/bind.h" |
| #include "base/memory/ptr_util.h" |
| #include "device/bluetooth/bluetooth_adapter_win.h" |
| -#include "device/bluetooth/bluetooth_gatt_notify_session_win.h" |
| +#include "device/bluetooth/bluetooth_gatt_notify_session.h" |
| #include "device/bluetooth/bluetooth_remote_gatt_descriptor_win.h" |
| #include "device/bluetooth/bluetooth_remote_gatt_service_win.h" |
| #include "device/bluetooth/bluetooth_task_manager_win.h" |
| @@ -145,8 +145,8 @@ void BluetoothRemoteGattCharacteristicWin::StartNotifySession( |
| DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); |
| if (IsNotifying()) { |
| - std::unique_ptr<BluetoothGattNotifySessionWin> notify_session( |
| - new BluetoothGattNotifySessionWin(weak_ptr_factory_.GetWeakPtr())); |
| + std::unique_ptr<BluetoothGattNotifySession> notify_session( |
| + new BluetoothGattNotifySession(weak_ptr_factory_.GetWeakPtr())); |
| ui_task_runner_->PostTask( |
| FROM_HERE, |
| base::Bind(callback, base::Passed(std::move(notify_session)))); |
| @@ -197,6 +197,13 @@ void BluetoothRemoteGattCharacteristicWin::StartNotifySession( |
| gatt_event_registeration_in_progress_ = true; |
| } |
| +void BluetoothRemoteGattCharacteristicWin::StopNotifySession( |
| + BluetoothGattNotifySession* session, |
| + const base::Closure& callback) { |
| + NOTIMPLEMENTED(); |
| + callback.Run(); |
|
ortuno
2016/08/19 19:13:27
Why not have it post a task as well?
tommyt
2016/08/22 06:34:12
Done.
|
| +} |
| + |
| void BluetoothRemoteGattCharacteristicWin::ReadRemoteCharacteristic( |
| const ValueCallback& callback, |
| const ErrorCallback& error_callback) { |
| @@ -262,6 +269,22 @@ uint16_t BluetoothRemoteGattCharacteristicWin::GetAttributeHandle() const { |
| return characteristic_info_->AttributeHandle; |
| } |
| +void BluetoothRemoteGattCharacteristicWin::SubscribeToNotifications( |
| + BluetoothRemoteGattDescriptor* ccc_descriptor, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) { |
| + // TODO(http://crbug.com/636270): Implement this method |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void BluetoothRemoteGattCharacteristicWin::UnsubscribeFromNotifications( |
| + BluetoothRemoteGattDescriptor* ccc_descriptor, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) { |
| + // TODO(http://crbug.com/636270): Implement this method |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| void BluetoothRemoteGattCharacteristicWin::OnGetIncludedDescriptorsCallback( |
| std::unique_ptr<BTH_LE_GATT_DESCRIPTOR> descriptors, |
| uint16_t num, |
| @@ -422,7 +445,7 @@ void BluetoothRemoteGattCharacteristicWin::GattEventRegistrationCallback( |
| gatt_event_handle_ = event_handle; |
| for (const auto& callback : callbacks) { |
| callback.first.Run(base::WrapUnique( |
| - new BluetoothGattNotifySessionWin(weak_ptr_factory_.GetWeakPtr()))); |
| + new BluetoothGattNotifySession(weak_ptr_factory_.GetWeakPtr()))); |
| } |
| } else { |
| for (const auto& callback : callbacks) |