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

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

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
Index: device/bluetooth/test/fake_bluetooth.h
diff --git a/device/bluetooth/test/fake_bluetooth.h b/device/bluetooth/test/fake_bluetooth.h
index 83e4bb480998e6f845f764f9b1f5ca48d71db461..0d7d1aa527e070408382ef18c4b97dfcbe2c16e1 100644
--- a/device/bluetooth/test/fake_bluetooth.h
+++ b/device/bluetooth/test/fake_bluetooth.h
@@ -4,16 +4,19 @@
#ifndef DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_
#define DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_
+#include <memory>
+
#include "base/compiler_specific.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
+#include "device/bluetooth/test/fake_central.h"
namespace bluetooth {
// Implementation of FakeBluetooth in
// src/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.
-// Implemented on top of the C++ device/bluetooth API.
+// Implemented on top of the C++ device/bluetooth API, mainly
+// device/bluetooth/bluetooth_adapter_factory.h.
class FakeBluetooth : NON_EXPORTED_BASE(public mojom::FakeBluetooth) {
public:
FakeBluetooth();
@@ -23,10 +26,13 @@ class FakeBluetooth : NON_EXPORTED_BASE(public mojom::FakeBluetooth) {
void SetLESupported(bool available,
const SetLESupportedCallback& callback) override;
+ void SimulateCentral(mojom::CentralState state,
+ const SimulateCentralCallback& callback) override;
private:
std::unique_ptr<device::BluetoothAdapterFactory::GlobalValuesForTesting>
global_factory_values_;
+ scoped_refptr<FakeCentral> fake_central_;
};
} // namespace bluetooth
« no previous file with comments | « device/bluetooth/public/interfaces/test/fake_bluetooth.mojom ('k') | device/bluetooth/test/fake_bluetooth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698