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

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

Issue 2663693002: Add listener for AdapterDiscoveringChanged on BT chooser-controller
Patch Set: Remove ".get()" in bluetooth_device_chooser_controller.cc Created 3 years, 9 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 1128fb80d4c8825cf9894ad18093c32399660298..8cf66b79bd95dabf0d3abcfd7d9d21e8cafe8022 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -402,6 +402,12 @@ void BluetoothDeviceChooserController::AdapterPoweredChanged(bool powered) {
}
}
+void BluetoothDeviceChooserController::AdapterDiscoveringChanged(
+ bool discovering) {
+ if (!discovering && discovery_session_ && discovery_session_->IsActive())
+ StopDeviceDiscovery();
+}
+
int BluetoothDeviceChooserController::CalculateSignalStrengthLevel(
int8_t rssi) {
RecordRSSISignalStrength(rssi);

Powered by Google App Engine
This is Rietveld 408576698