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

Unified Diff: device/bluetooth/bluetooth_low_energy_win.cc

Issue 378293007: Expose "visible" and "authenticated" properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth.le.win.part3
Patch Set: Created 6 years, 5 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_low_energy_win.h ('k') | device/bluetooth/bluetooth_task_manager_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_low_energy_win.cc
diff --git a/device/bluetooth/bluetooth_low_energy_win.cc b/device/bluetooth/bluetooth_low_energy_win.cc
index d0f12892a7d734c484260c8a7f31cda7843db347..21f4ecfa7967f0deadf266ec30b1a5f9007af989 100644
--- a/device/bluetooth/bluetooth_low_energy_win.cc
+++ b/device/bluetooth/bluetooth_low_energy_win.cc
@@ -322,6 +322,11 @@ bool CollectBluetoothLowEnergyDeviceStatus(
}
device_info->connected = !(value->AsUint32() & DN_DEVICE_DISCONNECTED);
+ // Windows 8 exposes BLE devices only if they are visible and paired. This
+ // might change in the future if Windows offers a public API for discovering
+ // and pairing BLE devices.
+ device_info->visible = true;
+ device_info->authenticated = true;
return true;
}
@@ -519,7 +524,7 @@ uint32_t DevicePropertyValue::AsUint32() const {
}
BluetoothLowEnergyDeviceInfo::BluetoothLowEnergyDeviceInfo()
- : connected(false) {
+ : visible(false), authenticated(false), connected(false) {
address.ullLong = BLUETOOTH_NULL_ADDRESS;
}
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_win.h ('k') | device/bluetooth/bluetooth_task_manager_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698