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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc

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_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)

Powered by Google App Engine
This is Rietveld 408576698