| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options.system.bluetooth', function() { | 5 cr.define('options.system.bluetooth', function() { |
| 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 7 /** @const */ var DeletableItem = options.DeletableItem; | 7 /** @const */ var DeletableItem = options.DeletableItem; |
| 8 /** @const */ var DeletableItemList = options.DeletableItemList; | 8 /** @const */ var DeletableItemList = options.DeletableItemList; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 this.classList.add('bluetooth-device'); | 62 this.classList.add('bluetooth-device'); |
| 63 this.connected = this.data.connected; | 63 this.connected = this.data.connected; |
| 64 // Though strictly speaking, a connected device will also be paired, we | 64 // Though strictly speaking, a connected device will also be paired, we |
| 65 // are interested in tracking paired devices that are not connected. | 65 // are interested in tracking paired devices that are not connected. |
| 66 this.paired = this.data.paired && !this.data.connected; | 66 this.paired = this.data.paired && !this.data.connected; |
| 67 this.connecting = !!this.data.pairing; | 67 this.connecting = !!this.data.pairing; |
| 68 var content = this.data.name; | 68 var content = this.data.name; |
| 69 // Update label for devices that are paired but not connected. | 69 // Update label for devices that are paired but not connected. |
| 70 if (this.paired) { | 70 if (this.paired) { |
| 71 content = content + ' (' + | 71 content = content + ' (' + |
| 72 templateData['bluetoothDeviceNotConnected'] + ')'; | 72 loadTimeData.getString('bluetoothDeviceNotConnected') + ')'; |
| 73 } | 73 } |
| 74 label.textContent = content; | 74 label.textContent = content; |
| 75 this.contentElement.appendChild(label); | 75 this.contentElement.appendChild(label); |
| 76 }, | 76 }, |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 /** | 79 /** |
| 80 * Class for displaying a list of Bluetooth devices. | 80 * Class for displaying a list of Bluetooth devices. |
| 81 * @constructor | 81 * @constructor |
| 82 * @extends {options.DeletableItemList} | 82 * @extends {options.DeletableItemList} |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 cr.defineProperty(BluetoothListItem, 'paired', cr.PropertyKind.BOOL_ATTR); | 295 cr.defineProperty(BluetoothListItem, 'paired', cr.PropertyKind.BOOL_ATTR); |
| 296 | 296 |
| 297 cr.defineProperty(BluetoothListItem, 'connecting', cr.PropertyKind.BOOL_ATTR); | 297 cr.defineProperty(BluetoothListItem, 'connecting', cr.PropertyKind.BOOL_ATTR); |
| 298 | 298 |
| 299 return { | 299 return { |
| 300 BluetoothListItem: BluetoothListItem, | 300 BluetoothListItem: BluetoothListItem, |
| 301 BluetoothDeviceList: BluetoothDeviceList, | 301 BluetoothDeviceList: BluetoothDeviceList, |
| 302 Constants: Constants | 302 Constants: Constants |
| 303 }; | 303 }; |
| 304 }); | 304 }); |
| OLD | NEW |