| 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/test/mock_bluetooth_gatt_notify_session.h" | 5 #include "device/bluetooth/test/mock_bluetooth_gatt_notify_session.h" |
| 6 #include "device/bluetooth/test/mock_bluetooth_adapter.h" | 6 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
| 7 #include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h" | 7 #include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h" |
| 8 | 8 |
| 9 using testing::Return; | 9 using testing::Return; |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 void MockBluetoothGattNotifySession::StopTestNotifications() { | 35 void MockBluetoothGattNotifySession::StopTestNotifications() { |
| 36 test_notifications_timer_.Stop(); | 36 test_notifications_timer_.Stop(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void MockBluetoothGattNotifySession::DoNotify( | 39 void MockBluetoothGattNotifySession::DoNotify( |
| 40 MockBluetoothAdapter* adapter, | 40 MockBluetoothAdapter* adapter, |
| 41 MockBluetoothGattCharacteristic* characteristic, | 41 MockBluetoothGattCharacteristic* characteristic, |
| 42 const std::vector<uint8_t>& value) { | 42 const std::vector<uint8_t>& value) { |
| 43 FOR_EACH_OBSERVER( | 43 for (auto& observer : adapter->GetObservers()) |
| 44 BluetoothAdapter::Observer, adapter->GetObservers(), | 44 observer.GattCharacteristicValueChanged(adapter, characteristic, value); |
| 45 GattCharacteristicValueChanged(adapter, characteristic, value)); | |
| 46 } | 45 } |
| 47 | 46 |
| 48 } // namespace device | 47 } // namespace device |
| OLD | NEW |