| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * Javascript for DeviceCollection, served from | 6 * Javascript for DeviceCollection, served from |
| 7 * chrome://bluetooth-internals/. | 7 * chrome://bluetooth-internals/. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 cr.define('device_collection', function() { | 10 cr.define('device_collection', function() { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 assert(device, 'Device does not exist.'); | 82 assert(device, 'Device does not exist.'); |
| 83 device.removed = true; | 83 device.removed = true; |
| 84 this.updateIndex(this.indexOf(device)); | 84 this.updateIndex(this.indexOf(device)); |
| 85 }, | 85 }, |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * Updates the device connection status. | 88 * Updates the device connection status. |
| 89 * @param {string} address The address of the device. | 89 * @param {string} address The address of the device. |
| 90 * @param {number} status The new connection status. | 90 * @param {number} status The new connection status. |
| 91 */ | 91 */ |
| 92 updateConnectionStatus: function(address, status, opt_error) { | 92 updateConnectionStatus: function(address, status) { |
| 93 var device = assert(this.getByAddress(address), 'Device does not exist'); | 93 var device = assert(this.getByAddress(address), 'Device does not exist'); |
| 94 device.connectionStatus = status; | 94 device.connectionStatus = status; |
| 95 this.updateIndex(this.indexOf(device)); | 95 this.updateIndex(this.indexOf(device)); |
| 96 }, | 96 }, |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 return { | 99 return { |
| 100 ConnectionStatus: ConnectionStatus, | 100 ConnectionStatus: ConnectionStatus, |
| 101 DeviceCollection: DeviceCollection, | 101 DeviceCollection: DeviceCollection, |
| 102 }; | 102 }; |
| 103 }); | 103 }); |
| OLD | NEW |