Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: chrome/browser/resources/bluetooth_internals/device_collection.js

Issue 2576603002: bluetooth: Add device details page with basic properties to internals page. (Closed)
Patch Set: Fix device-details-template class Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698