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

Unified Diff: device/bluetooth/dbus/bluetooth_gatt_descriptor_delegate_wrapper.cc

Issue 1979163002: Add DBus plumbing and tests for sending devices with ATT read/writes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devices
Patch Set: gyp fix Created 4 years, 7 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/dbus/bluetooth_gatt_descriptor_delegate_wrapper.cc
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_delegate_wrapper.cc b/device/bluetooth/dbus/bluetooth_gatt_descriptor_delegate_wrapper.cc
index fc83b85ca48ad48658bb41653998335c5ce08fac..b561a1dbddcc3b808a53e172c967369b148ce93e 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_delegate_wrapper.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_delegate_wrapper.cc
@@ -11,23 +11,26 @@ namespace bluez {
BluetoothGattDescriptorDelegateWrapper::BluetoothGattDescriptorDelegateWrapper(
BluetoothLocalGattServiceBlueZ* service,
BluetoothLocalGattDescriptorBlueZ* descriptor)
- : service_(service), descriptor_(descriptor) {}
+ : BluetoothGattAttributeValueDelegate(service), descriptor_(descriptor) {}
void BluetoothGattDescriptorDelegateWrapper::GetValue(
+ const dbus::ObjectPath& device_path,
const device::BluetoothLocalGattService::Delegate::ValueCallback& callback,
const device::BluetoothLocalGattService::Delegate::ErrorCallback&
error_callback) {
- service_->GetDelegate()->OnDescriptorReadRequest(nullptr, descriptor_, 0,
- callback, error_callback);
+ service()->GetDelegate()->OnDescriptorReadRequest(
+ GetDeviceWithPath(device_path), descriptor_, 0, callback, error_callback);
}
void BluetoothGattDescriptorDelegateWrapper::SetValue(
+ const dbus::ObjectPath& device_path,
const std::vector<uint8_t>& value,
const base::Closure& callback,
const device::BluetoothLocalGattService::Delegate::ErrorCallback&
error_callback) {
- service_->GetDelegate()->OnDescriptorWriteRequest(
- nullptr, descriptor_, value, 0, callback, error_callback);
+ service()->GetDelegate()->OnDescriptorWriteRequest(
+ GetDeviceWithPath(device_path), descriptor_, value, 0, callback,
+ error_callback);
}
} // namespace bluez

Powered by Google App Engine
This is Rietveld 408576698