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

Unified Diff: device/bluetooth/bluetooth_classic_win.cc

Issue 1672843002: Implement fake Bluetooth adapter for BluetoothTest.ConstructFakeAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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
« no previous file with comments | « device/bluetooth/bluetooth_classic_win.h ('k') | device/bluetooth/bluetooth_classic_win_fake.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_classic_win.cc
diff --git a/device/bluetooth/bluetooth_classic_win.cc b/device/bluetooth/bluetooth_classic_win.cc
index 2f19cb1bb9f206ded6ed465644cb9c17c2492896..b4e4eac5635d3f1abc2fac1719960a7569cbd328 100644
--- a/device/bluetooth/bluetooth_classic_win.cc
+++ b/device/bluetooth/bluetooth_classic_win.cc
@@ -35,7 +35,14 @@ BluetoothClassicWrapper::~BluetoothClassicWrapper() {}
HBLUETOOTH_RADIO_FIND BluetoothClassicWrapper::FindFirstRadio(
const BLUETOOTH_FIND_RADIO_PARAMS* params,
HANDLE* out_handle) {
- return BluetoothFindFirstRadio(params, out_handle);
+ HANDLE radio_handle = NULL;
+ HBLUETOOTH_RADIO_FIND radio_find_handle =
+ BluetoothFindFirstRadio(params, &radio_handle);
+ if (radio_find_handle) {
+ opened_radio_handle_.Set(radio_handle);
+ *out_handle = opened_radio_handle_.Get();
+ }
+ return radio_find_handle;
}
DWORD BluetoothClassicWrapper::GetRadioInfo(
@@ -77,5 +84,9 @@ BOOL BluetoothClassicWrapper::EnableIncomingConnections(HANDLE handle,
return BluetoothEnableIncomingConnections(handle, is_enable);
}
+DWORD BluetoothClassicWrapper::LastError() {
+ return GetLastError();
+}
+
} // namespace win
} // namespace device
« no previous file with comments | « device/bluetooth/bluetooth_classic_win.h ('k') | device/bluetooth/bluetooth_classic_win_fake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698