| 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..1a5f56a40664ca03bbf1e37e86e17f72df3ab74a 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 OnBluetoothAttemptReadGattCharacteristic() override;
|
| + void OnBluetoothAttemptWriteGattCharacteristic() override;
|
| +
|
| + // win::BluetoothLowEnergyWrapperFake::Observer overrides.
|
| + void onWriteGattCharacteristicValue(
|
| + PBTH_LE_GATT_CHARACTERISTIC_VALUE value) override;
|
| +
|
| private:
|
| scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_;
|
| scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_;
|
| @@ -52,6 +78,8 @@ 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);
|
|
|