Chromium Code Reviews| Index: device/bluetooth/test/mock_bluetooth_gatt_notify_session.h |
| diff --git a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h |
| index 97c28e7bb6ef5f0bd33148b46c7c2a3e568cd3f8..56a21fd33623130f0dad06f1882c7219fc9291d5 100644 |
| --- a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h |
| +++ b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h |
| @@ -8,11 +8,15 @@ |
| #include <string> |
| #include "base/callback.h" |
| +#include "base/timer/timer.h" |
| #include "device/bluetooth/bluetooth_gatt_notify_session.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| namespace device { |
| +class MockBluetoothAdapter; |
| +class MockBluetoothGattCharacteristic; |
| + |
| class MockBluetoothGattNotifySession : public BluetoothGattNotifySession { |
| public: |
| explicit MockBluetoothGattNotifySession( |
| @@ -23,7 +27,20 @@ class MockBluetoothGattNotifySession : public BluetoothGattNotifySession { |
| MOCK_METHOD0(IsActive, bool()); |
| MOCK_METHOD1(Stop, void(const base::Closure&)); |
| + // Starts notifying the adapter's observers that the characteristic's value |
|
scheib
2015/10/16 20:39:25
Timer concept is leaking outside of only Web Bluet
ortuno
2015/10/16 21:55:49
Done.
|
| + // changed. |
| + void StartTestNotifications(MockBluetoothAdapter* adapter, |
| + MockBluetoothGattCharacteristic* characteristic, |
| + const std::vector<uint8_t>& value); |
| + void StopTestNotifications(); |
| + |
| private: |
| + void DoNotify(MockBluetoothAdapter* adapter, |
| + MockBluetoothGattCharacteristic* characteristic, |
| + const std::vector<uint8_t>& value); |
| + |
| + base::RepeatingTimer test_notifications_timer_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattNotifySession); |
| }; |