| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/fake_bluetooth_gatt_descriptor_client.h" | 5 #include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 delete iter->second; | 189 delete iter->second; |
| 190 properties_.erase(iter); | 190 properties_.erase(iter); |
| 191 } | 191 } |
| 192 | 192 |
| 193 void FakeBluetoothGattDescriptorClient::OnPropertyChanged( | 193 void FakeBluetoothGattDescriptorClient::OnPropertyChanged( |
| 194 const dbus::ObjectPath& object_path, | 194 const dbus::ObjectPath& object_path, |
| 195 const std::string& property_name) { | 195 const std::string& property_name) { |
| 196 VLOG(2) << "Descriptor property changed: " << object_path.value() << ": " | 196 VLOG(2) << "Descriptor property changed: " << object_path.value() << ": " |
| 197 << property_name; | 197 << property_name; |
| 198 | 198 |
| 199 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, | 199 for (auto& observer : observers_) |
| 200 GattDescriptorPropertyChanged(object_path, property_name)); | 200 observer.GattDescriptorPropertyChanged(object_path, property_name); |
| 201 } | 201 } |
| 202 | 202 |
| 203 void FakeBluetoothGattDescriptorClient::NotifyDescriptorAdded( | 203 void FakeBluetoothGattDescriptorClient::NotifyDescriptorAdded( |
| 204 const dbus::ObjectPath& object_path) { | 204 const dbus::ObjectPath& object_path) { |
| 205 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, | 205 for (auto& observer : observers_) |
| 206 GattDescriptorAdded(object_path)); | 206 observer.GattDescriptorAdded(object_path); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void FakeBluetoothGattDescriptorClient::NotifyDescriptorRemoved( | 209 void FakeBluetoothGattDescriptorClient::NotifyDescriptorRemoved( |
| 210 const dbus::ObjectPath& object_path) { | 210 const dbus::ObjectPath& object_path) { |
| 211 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, | 211 for (auto& observer : observers_) |
| 212 GattDescriptorRemoved(object_path)); | 212 observer.GattDescriptorRemoved(object_path); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace bluez | 215 } // namespace bluez |
| OLD | NEW |