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..956c8bc40f83908e9c3d9746eca99bc20b055b39 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 (!device.paired || device.connecting) |
| + return ''; |
| + return this.i18n( |
| + device.connected ? 'bluetoothConnected' : 'bluetoothNotConnected'); |
| + }, |
| + |
| + /** |
| + * @param {!chrome.bluetooth.Device} device |
| + * @return {boolean} True if connection status should be shown as the |
| + * secandary text of the |device| in device list. |
|
stevenjb
2017/01/18 18:06:17
secondary
fukino
2017/01/19 01:06:17
Done.
|
| + * @private |
| + */ |
| + hasConnectionStatusText_: function(device) { |
| + return this.getConnectionStatusText_(device) != ''; |
|
stevenjb
2017/01/18 18:06:17
nit: Put the logic here and call this from getConn
fukino
2017/01/19 01:06:17
Done.
|
| + }, |
| + |
| + /** |
| + * @param {!chrome.bluetooth.Device} device |
| * @return {boolean} |
| * @private |
| */ |