Chromium Code Reviews| Index: device/bluetooth/test/bluetooth_test_win.h |
| diff --git a/device/bluetooth/test/bluetooth_test_win.h b/device/bluetooth/test/bluetooth_test_win.h |
| index d87baccf31f7cb4ac760c7cc87a71125fc278b80..1c4ebf872d93137b454204e8ec1d8adfa10945fb 100644 |
| --- a/device/bluetooth/test/bluetooth_test_win.h |
| +++ b/device/bluetooth/test/bluetooth_test_win.h |
| @@ -12,12 +12,16 @@ |
| #include "base/test/test_simple_task_runner.h" |
| #include "device/bluetooth/bluetooth_classic_win_fake.h" |
| #include "device/bluetooth/bluetooth_low_energy_win_fake.h" |
| +#include "device/bluetooth/bluetooth_task_manager_win.h" |
| namespace device { |
| class BluetoothAdapterWin; |
| +class BluetoothRemoteGattCharacteristicWin; |
| // Windows implementation of BluetoothTestBase. |
| -class BluetoothTestWin : public BluetoothTestBase { |
| +class BluetoothTestWin : public BluetoothTestBase, |
| + public BluetoothTaskManagerWin::Observer, |
| + public win::BluetoothLowEnergyWrapperFake::Observer { |
| public: |
| BluetoothTestWin(); |
| ~BluetoothTestWin() override; |
| @@ -41,9 +45,31 @@ class BluetoothTestWin : public BluetoothTestBase { |
| void SimulateGattCharacteristicRemoved( |
| BluetoothGattService* service, |
| BluetoothGattCharacteristic* characteristic) override; |
| + void RememberCharacteristicForSubsequentAction( |
| + BluetoothGattCharacteristic* characteristic) override; |
| + void SimulateGattCharacteristicRead( |
| + BluetoothGattCharacteristic* characteristic, |
| + const std::vector<uint8_t>& value) override; |
| + void SimulateGattCharacteristicReadError( |
| + BluetoothGattCharacteristic* characteristic, |
| + BluetoothGattService::GattErrorCode error_code) override; |
| + void SimulateGattCharacteristicWrite( |
| + BluetoothGattCharacteristic* characteristic) override; |
| + void SimulateGattCharacteristicWriteError( |
| + BluetoothGattCharacteristic* characteristic, |
| + BluetoothGattService::GattErrorCode error_code) override; |
| + void DeleteDevice(BluetoothDevice* device) override; |
| void SimulateGattDescriptor(BluetoothGattCharacteristic* characteristic, |
| const std::string& uuid) override; |
| + // BluetoothTaskManagerWin::Observer overrides. |
| + void OnAttemptReadGattCharacteristic() override; |
| + void OnAttemptWriteGattCharacteristic() override; |
| + |
| + // win::BluetoothLowEnergyWrapperFake::Observer overrides. |
| + void onWriteGattCharacteristicValue( |
| + const PBTH_LE_GATT_CHARACTERISTIC_VALUE value) override; |
| + |
| private: |
| scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_; |
| scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_; |
| @@ -52,11 +78,14 @@ class BluetoothTestWin : public BluetoothTestBase { |
| win::BluetoothClassicWrapperFake* fake_bt_classic_wrapper_; |
| win::BluetoothLowEnergyWrapperFake* fake_bt_le_wrapper_; |
| + BluetoothRemoteGattCharacteristicWin* remembered_characteristic_; |
| + |
| void AdapterInitCallback(); |
| win::GattService* GetSimulatedService(win::BLEDevice* device, |
| BluetoothGattService* service); |
| win::GattCharacteristic* GetSimulatedCharacteristic( |
| BluetoothGattCharacteristic* characteristic); |
| + void RunPendingBluetoothTasksUntilGetCallback(); |
|
scheib
2016/03/03 19:03:28
grammar of 'get' is incorrect here. Try something
gogerald1
2016/03/03 19:27:33
Done.
|
| void ForceRefreshDevice(); |
| void FinishPendingTasks(); |
| }; |