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

Unified Diff: device/bluetooth/bluez/bluetooth_adapter_bluez.cc

Issue 2039773005: Add support in Chrome to send notifications to a specific device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/bluez/bluetooth_adapter_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
index 18cc1edd72db83554c2f2b24d0dfe6b5ba6ea677..c5cdc9ad39d1e4bf473a5fc56158589fa1ca67f0 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -1129,15 +1129,24 @@ bool BluetoothAdapterBlueZ::IsGattServiceRegistered(
}
bool BluetoothAdapterBlueZ::SendValueChanged(
+ const device::BluetoothDevice* device,
BluetoothLocalGattCharacteristicBlueZ* characteristic,
- const std::vector<uint8_t>& value) {
+ const std::vector<uint8_t>& value,
+ bool indicate) {
if (registered_gatt_services_.count(
static_cast<BluetoothLocalGattServiceBlueZ*>(
characteristic->GetService())
->object_path()) == 0)
return false;
- gatt_application_provider_->SendValueChanged(characteristic->object_path(),
- value);
+
+ dbus::ObjectPath device_path;
+ if (device) {
+ device_path =
+ static_cast<const BluetoothDeviceBlueZ*>(device)->object_path();
+ }
+
+ gatt_application_provider_->SendValueChanged(
+ device_path, characteristic->object_path(), value, indicate);
return true;
}
« no previous file with comments | « device/bluetooth/bluez/bluetooth_adapter_bluez.h ('k') | device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698