Chromium Code Reviews| Index: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js |
| diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js |
| index 8816fd12e8d9d027cd027f3e9c6523b901d75598..fb87d7a0209fc90eb49ab822adbfeb5dff6cedc0 100644 |
| --- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js |
| +++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js |
| @@ -71,6 +71,28 @@ Polymer({ |
| /** |
| * @param {!chrome.bluetooth.Device} device |
| + * @return {string} The text to display the connection status of |device|. |
| + * @private |
| + */ |
| + getConnectionStatusText_: function(device) { |
| + if (!this.hasConnectionStatusText_(device)) |
| + return ''; |
| + return this.i18n( |
| + device.connected ? 'bluetoothConnected' : 'bluetoothNotConnected'); |
| + }, |
| + |
| + /** |
| + * @param {!chrome.bluetooth.Device} device |
| + * @return {boolean} True if connection status should be shown as the |
| + * secondary text of the |device| in device list. |
| + * @private |
| + */ |
| + hasConnectionStatusText_: function(device) { |
| + return !!device.paired && !device.connecting; |
|
fukino
2017/01/19 21:11:25
device.paired is {boolean|undefined}, so I needed
stevenjb
2017/01/19 22:11:02
This is correct.
|
| + }, |
| + |
| + /** |
| + * @param {!chrome.bluetooth.Device} device |
| * @return {boolean} |
| * @private |
| */ |