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

Unified Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.cc

Issue 2245603003: Add signal strength indicator icon to WebBluetooth chooser on non-Mac desktops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and added code to update RSSI Created 4 years, 4 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: content/browser/bluetooth/bluetooth_device_chooser_controller.cc
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index dc4842b2dad2da78247315e3658014f4e3e3da7f..7d9d78b2610f5524fb70735a941190998457e993 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -340,13 +340,13 @@ void BluetoothDeviceChooserController::GetDevice(
void BluetoothDeviceChooserController::AddFilteredDevice(
const device::BluetoothDevice& device) {
if (chooser_.get() && MatchesFilters(device, options_->filters)) {
+ base::Optional<int8_t> rssi = device.GetInquiryRSSI();
chooser_->AddOrUpdateDevice(
device.GetAddress(), !!device.GetName() /* should_update_name */,
device.GetNameForDisplay(),
// TODO(http://crbug.com/543466): Show connection and paired status.
false /* is_gatt_connected */, false /* is_paired */,
- // TODO(http://crbug.com/629689): Add signal strength indicator.
- nullptr /* rssi */);
+ rssi ? &(rssi.value()) : nullptr);
Jeffrey Yasskin 2016/08/19 17:46:54 You don't need the parentheses around (rssi.value(
juncai 2016/08/19 22:59:17 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698