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

Unified Diff: device/bluetooth/bluetooth_classic_win_fake.h

Issue 1672843002: Implement fake Bluetooth adapter for BluetoothTest.ConstructFakeAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move ScopedHandle from task manager to low level code Created 4 years, 10 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/bluetooth_classic_win_fake.h
diff --git a/device/bluetooth/bluetooth_classic_win_fake.h b/device/bluetooth/bluetooth_classic_win_fake.h
index 9c1a1b91df8283135267bd551c2bc971684ad637..60aa2140a085c355ed653cc212c13af1282cc841 100644
--- a/device/bluetooth/bluetooth_classic_win_fake.h
+++ b/device/bluetooth/bluetooth_classic_win_fake.h
@@ -7,8 +7,17 @@
#include "device/bluetooth/bluetooth_classic_win.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/strings/string16.h"
+
namespace device {
namespace win {
+
+struct BluetoothRadio {
+ BLUETOOTH_RADIO_INFO radio_info;
+ BOOL is_connectable;
+};
+
// Fake implementation of BluetoothClassicWrapper. Used for BluetoothTestWin.
class BluetoothClassicWrapperFake : public BluetoothClassicWrapper {
public:
@@ -30,6 +39,12 @@ class BluetoothClassicWrapperFake : public BluetoothClassicWrapper {
BOOL FindDeviceClose(HBLUETOOTH_DEVICE_FIND handle) override;
BOOL EnableDiscovery(HANDLE handle, BOOL is_enable) override;
BOOL EnableIncomingConnections(HANDLE handle, BOOL is_enable) override;
+
+ BluetoothRadio* SimulateARadio(base::string16 name,
+ BLUETOOTH_ADDRESS address);
+
+ private:
+ scoped_ptr<BluetoothRadio> simulated_radios_;
scheib 2016/02/07 01:45:19 Seems there's only ever one radio possible, so jus
gogerald1 2016/02/08 17:00:05 Yes, so as in BluetoothTaskManager, we could exten
};
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698