| Index: device/bluetooth/test/fake_bluetooth.cc
|
| diff --git a/device/bluetooth/test/fake_bluetooth.cc b/device/bluetooth/test/fake_bluetooth.cc
|
| index e9af2b3fd19bb1abf3524e2d6a0a6b66adf9eb41..b1430f272e1c70fdc771e0d0d49e017d50298d8d 100644
|
| --- a/device/bluetooth/test/fake_bluetooth.cc
|
| +++ b/device/bluetooth/test/fake_bluetooth.cc
|
| @@ -7,6 +7,7 @@
|
| #include <utility>
|
|
|
| #include "base/memory/ptr_util.h"
|
| +#include "device/bluetooth/bluetooth_adapter_factory.h"
|
| #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h"
|
| #include "mojo/public/cpp/bindings/strong_binding.h"
|
|
|
| @@ -27,4 +28,12 @@ void FakeBluetooth::SetLESupported(bool available,
|
| callback.Run();
|
| }
|
|
|
| +void FakeBluetooth::SimulateCentral(mojom::CentralState state,
|
| + const SimulateCentralCallback& callback) {
|
| + mojom::FakeCentralPtr fake_central_ptr;
|
| + fake_central_ = new FakeCentral(state, mojo::MakeRequest(&fake_central_ptr));
|
| + device::BluetoothAdapterFactory::SetAdapterForTesting(fake_central_);
|
| + callback.Run(std::move(fake_central_ptr));
|
| +}
|
| +
|
| } // namespace bluetooth
|
|
|