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

Unified Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js

Issue 2801403002: MD Settings: Bluetooth: Fix adapter state and discovery (Closed)
Patch Set: Use CHECK instead of early exit Created 3 years, 8 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: chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
index bbff7a444320c4665809a22a8290ce354dec454f..686d001a93c0236813c26bc87e0c2a1252f333d5 100644
--- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
+++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
@@ -22,11 +22,14 @@ Polymer({
properties: {
/** Reflects the bluetooth-page property. */
- bluetoothEnabled: {
+ bluetoothToggleState: {
type: Boolean,
notify: true,
},
+ /** Reflects the bluetooth-page property. */
+ bluetoothToggleDisabled: Boolean,
+
/**
* The bluetooth adapter state, cached by bluetooth-page.
* @type {!chrome.bluetooth.AdapterState|undefined}
@@ -249,7 +252,7 @@ Polymer({
* @private
*/
updateDeviceList_: function() {
- if (!this.bluetoothEnabled) {
+ if (!this.bluetoothToggleState) {
this.deviceList_ = [];
return;
}
@@ -352,23 +355,23 @@ Polymer({
},
/**
- * @param {boolean} bluetoothEnabled
+ * @param {boolean} bluetoothToggleState
* @param {!Array<!chrome.bluetooth.Device>} deviceList
* @return {boolean}
* @private
*/
- showDevices_: function(bluetoothEnabled, deviceList) {
- return bluetoothEnabled && deviceList.length > 0;
+ showDevices_: function(bluetoothToggleState, deviceList) {
+ return bluetoothToggleState && deviceList.length > 0;
},
/**
- * @param {boolean} bluetoothEnabled
+ * @param {boolean} bluetoothToggleState
* @param {!Array<!chrome.bluetooth.Device>} deviceList
* @return {boolean}
* @private
*/
- showNoDevices_: function(bluetoothEnabled, deviceList) {
- return bluetoothEnabled && deviceList.length == 0;
+ showNoDevices_: function(bluetoothToggleState, deviceList) {
+ return bluetoothToggleState && deviceList.length == 0;
},
/**

Powered by Google App Engine
This is Rietveld 408576698