Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2685)

Unified Diff: device/bluetooth/test/fake_bluetooth.cc

Issue 2853433002: bluetooth: Implement simulateCentral (Closed)
Patch Set: Address dcheng's comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/test/fake_bluetooth.h ('k') | device/bluetooth/test/fake_central.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « device/bluetooth/test/fake_bluetooth.h ('k') | device/bluetooth/test/fake_central.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698