Index: device/bluetooth/test/fake_bluetooth.cc |
diff --git a/device/bluetooth/test/fake_bluetooth.cc b/device/bluetooth/test/fake_bluetooth.cc |
index 08c6615c208933c6cea416a9293cf9a81a2e92ce..16486e422701db02d0324acf8ca5fa568f9d9cbd 100644 |
--- a/device/bluetooth/test/fake_bluetooth.cc |
+++ b/device/bluetooth/test/fake_bluetooth.cc |
@@ -32,4 +32,13 @@ void FakeBluetooth::SetLESupported(bool supported, |
callback.Run(); |
} |
+void FakeBluetooth::SimulateCentral(mojom::CentralState state, |
+ const SimulateCentralCallback& callback) { |
+ mojom::FakeCentralPtr fake_central_ptr; |
+ fake_central_ = base::MakeShared<FakeCentral>( |
+ state, mojo::MakeRequest(&fake_central_ptr)); |
+ device::BluetoothAdapterFactory::SetAdapterForTesting(fake_central_); |
+ callback.Run(std::move(fake_central_ptr)); |
+} |
+ |
} // namespace bluetooth |