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

Side by Side Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js

Issue 1875413002: MD Settings: polish top-level bluetooth page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fixes Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-bluetooth-page' is the settings page for managing bluetooth 7 * 'settings-bluetooth-page' is the settings page for managing bluetooth
8 * properties and devices. 8 * properties and devices.
9 * 9 *
10 * Example: 10 * Example:
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 }, 191 },
192 192
193 bluetoothEnabledChanged_: function() { 193 bluetoothEnabledChanged_: function() {
194 // When bluetooth is enabled, auto-expand the device list. 194 // When bluetooth is enabled, auto-expand the device list.
195 if (this.bluetoothEnabled) 195 if (this.bluetoothEnabled)
196 this.deviceListExpanded = true; 196 this.deviceListExpanded = true;
197 }, 197 },
198 198
199 /** 199 /**
200 * @param {boolean} bluetoothEnabled
201 * @param {boolean} deviceListExpanded
202 * @return {boolean} Whether the <iron-collapse> can be shown.
203 * @private
204 */
205 canShowDeviceList_: function(bluetoothEnabled, deviceListExpanded) {
206 return bluetoothEnabled && deviceListExpanded;
207 },
208
209 /**
200 * If bluetooth is enabled, request the complete list of devices and update 210 * If bluetooth is enabled, request the complete list of devices and update
201 * |deviceList|. 211 * |deviceList|.
202 * @private 212 * @private
203 */ 213 */
204 updateDeviceList_: function() { 214 updateDeviceList_: function() {
205 if (!this.bluetoothEnabled) { 215 if (!this.bluetoothEnabled) {
206 this.deviceList = []; 216 this.deviceList = [];
207 return; 217 return;
208 } 218 }
209 this.bluetooth.getDevices(function(devices) { 219 this.bluetooth.getDevices(function(devices) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 521
512 /** @private */ 522 /** @private */
513 onCloseDialog_: function(event) { this.closeDialog_(); }, 523 onCloseDialog_: function(event) { this.closeDialog_(); },
514 524
515 /** @private */ 525 /** @private */
516 onDialogOpened_: function() { this.startDiscovery_(); }, 526 onDialogOpened_: function() { this.startDiscovery_(); },
517 527
518 /** @private */ 528 /** @private */
519 onDialogClosed_: function() { this.stopDiscovery_(); }, 529 onDialogClosed_: function() { this.stopDiscovery_(); },
520 }); 530 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698