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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.cc

Issue 2076433002: Revert of 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_i mpl.h" 5 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_i mpl.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 BluetoothGattCharacteristicServiceProviderImpl:: 107 BluetoothGattCharacteristicServiceProviderImpl::
108 ~BluetoothGattCharacteristicServiceProviderImpl() { 108 ~BluetoothGattCharacteristicServiceProviderImpl() {
109 VLOG(1) << "Cleaning up Bluetooth GATT characteristic: " 109 VLOG(1) << "Cleaning up Bluetooth GATT characteristic: "
110 << object_path_.value(); 110 << object_path_.value();
111 if (bus_) 111 if (bus_)
112 bus_->UnregisterExportedObject(object_path_); 112 bus_->UnregisterExportedObject(object_path_);
113 } 113 }
114 114
115 void BluetoothGattCharacteristicServiceProviderImpl::SendValueChanged( 115 void BluetoothGattCharacteristicServiceProviderImpl::SendValueChanged(
116 const dbus::ObjectPath& /* device_path */, 116 const std::vector<uint8_t>& value) {
117 const std::vector<uint8_t>& value,
118 bool /* indicate */) {
119 // Running a test, don't actually try to write to use DBus. 117 // Running a test, don't actually try to write to use DBus.
120 if (!bus_) 118 if (!bus_)
121 return; 119 return;
122 120
123 VLOG(2) << "Emitting a PropertiesChanged signal for characteristic value."; 121 VLOG(2) << "Emitting a PropertiesChanged signal for characteristic value.";
124 dbus::Signal signal(dbus::kDBusPropertiesInterface, 122 dbus::Signal signal(dbus::kDBusPropertiesInterface,
125 dbus::kDBusPropertiesChangedSignal); 123 dbus::kDBusPropertiesChangedSignal);
126 dbus::MessageWriter writer(&signal); 124 dbus::MessageWriter writer(&signal);
127 dbus::MessageWriter array_writer(NULL); 125 dbus::MessageWriter array_writer(NULL);
128 dbus::MessageWriter dict_entry_writer(NULL); 126 dbus::MessageWriter dict_entry_writer(NULL);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 method_call, kErrorFailed, "Failed to get/set characteristic value."); 415 method_call, kErrorFailed, "Failed to get/set characteristic value.");
418 response_sender.Run(std::move(error_response)); 416 response_sender.Run(std::move(error_response));
419 } 417 }
420 418
421 const dbus::ObjectPath& 419 const dbus::ObjectPath&
422 BluetoothGattCharacteristicServiceProviderImpl::object_path() const { 420 BluetoothGattCharacteristicServiceProviderImpl::object_path() const {
423 return object_path_; 421 return object_path_;
424 } 422 }
425 423
426 } // namespace bluez 424 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698