| Index: chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js
|
| diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js
|
| index 29a6ca68a9b3e8672ff5865676d83d8b8729a548..4263b5fa382904da9cee0583844501755ad9a4eb 100644
|
| --- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js
|
| +++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js
|
| @@ -80,6 +80,17 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * The ordered list of paired or connecting bluetooth devices.
|
| + * @type {!Array<!chrome.bluetooth.Device>}
|
| + */
|
| + pairedDeviceList_: {
|
| + type: Array,
|
| + value: /** @return {Array} */ function() {
|
| + return [];
|
| + },
|
| + },
|
| +
|
| + /**
|
| * Reflects the iron-list selecteditem property.
|
| * @type {!chrome.bluetooth.Device}
|
| * @private
|
| @@ -228,6 +239,14 @@ Polymer({
|
|
|
| /** @private */
|
| deviceListChanged_: function() {
|
| + var devices = this.$.devices;
|
| + this.saveScroll(devices);
|
| + this.pairedDeviceList_ = this.deviceList_.filter(function(device) {
|
| + return !!device.paired || !!device.connecting;
|
| + });
|
| + this.updateScrollableContents();
|
| + this.restoreScroll(devices);
|
| +
|
| for (var i = 0; i < this.deviceList_.length; ++i) {
|
| if (this.deviceList_[i].connected) {
|
| this.deviceConnected_ = true;
|
| @@ -289,7 +308,6 @@ Polymer({
|
| }
|
| this.bluetooth.getDevices(function(devices) {
|
| this.deviceList_ = devices;
|
| - this.updateScrollableContents();
|
| }.bind(this));
|
| },
|
|
|
| @@ -486,16 +504,6 @@ Polymer({
|
| },
|
|
|
| /**
|
| - * @return {!Array<!chrome.bluetooth.Device>}
|
| - * @private
|
| - */
|
| - getPairedOrConnecting_: function() {
|
| - return this.deviceList_.filter(function(device) {
|
| - return !!device.paired || !!device.connecting;
|
| - });
|
| - },
|
| -
|
| - /**
|
| * @return {boolean} True if deviceList contains any paired devices.
|
| * @private
|
| */
|
|
|