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

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

Issue 2663693002: Add listener for AdapterDiscoveringChanged on BT chooser-controller
Patch Set: Created 3 years, 11 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 ac2ac7b2a632e29494d3f8fbb47e39cb5f3335af..f93ec0431d2ca997662a7c617b1ab390c9275026 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -466,6 +466,14 @@ void BluetoothDeviceChooserController::AdapterPoweredChanged(bool powered) {
}
}
+void BluetoothDeviceChooserController::AdapterDiscoveringChanged(
+ bool discovering) {
+ if (!discovering && discovery_session_.get() &&
scheib 2017/02/13 21:06:54 Remove ".get()", it is not required.
+ discovery_session_->IsActive()) {
+ StopDeviceDiscovery();
+ }
+}
+
int BluetoothDeviceChooserController::CalculateSignalStrengthLevel(
int8_t rssi) {
RecordRSSISignalStrength(rssi);

Powered by Google App Engine
This is Rietveld 408576698