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

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

Issue 2538653002: bluetooth: Add sidebar and page manager for chrome://bluetooth-internals. (Closed)
Patch Set: Fix const Created 4 years 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 DeviceTable UI, served from chrome://bluetooth-internals/. 6 * Javascript for DeviceTable UI, served from chrome://bluetooth-internals/.
7 */ 7 */
8 8
9 cr.define('device_table', function() { 9 cr.define('device_table', function() {
10 var COLUMNS = { 10 var COLUMNS = {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 this.updateRow_(this.devices_.item(event.index), event.index); 70 this.updateRow_(this.devices_.item(event.index), event.index);
71 }, 71 },
72 72
73 /** 73 /**
74 * Fires a inspect pressed event for the row |index|. 74 * Fires a inspect pressed event for the row |index|.
75 * @private 75 * @private
76 * @param {number} index 76 * @param {number} index
77 */ 77 */
78 handleInspectBtn_: function(index) { 78 handleInspectBtn_: function(index) {
79 var event = new CustomEvent('inspectpressed', { 79 var event = new CustomEvent('inspectpressed', {
80 bubbles: true,
80 detail: { 81 detail: {
81 address: this.devices_.item(index).address, 82 address: this.devices_.item(index).address,
82 } 83 }
83 }); 84 });
84 this.dispatchEvent(event); 85 this.dispatchEvent(event);
85 }, 86 },
86 87
87 /** 88 /**
88 * Updates table row on splice event of the device collection. 89 * Updates table row on splice event of the device collection.
89 * @private 90 * @private
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 cell.textContent = obj == null ? 'Unknown' : obj; 197 cell.textContent = obj == null ? 'Unknown' : obj;
197 cell.dataset.label = header.textContent; 198 cell.dataset.label = header.textContent;
198 } 199 }
199 }, 200 },
200 }; 201 };
201 202
202 return { 203 return {
203 DeviceTable: DeviceTable, 204 DeviceTable: DeviceTable,
204 }; 205 };
205 }); 206 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698