OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 /** | |
6 * Javascript for DevicesView, served from chrome://bluetooth-internals/. | |
7 */ | |
8 | |
9 cr.define('devices_view', function() { | |
10 /** @const */ var Page = cr.ui.pageManager.Page; | |
11 | |
12 /** | |
13 * Page for device table and associated controls. | |
ortuno
2016/12/01 06:27:03
nit: Page that contains a device table and associa
mbrunson
2016/12/02 02:31:45
Done.
| |
14 * @constructor | |
15 * @extends {cr.ui.pageManager.Page} | |
16 */ | |
17 function DevicesView() { | |
18 Page.call(this, 'devices', 'Devices', 'devices'); | |
19 this.deviceTable = new device_table.DeviceTable(); | |
20 this.pageDiv.appendChild(this.deviceTable); | |
21 } | |
22 | |
23 cr.addSingletonGetter(DevicesView); | |
24 | |
25 DevicesView.prototype = { | |
26 __proto__: Page.prototype, | |
27 | |
28 /** | |
29 * Sets the device table's device collection. | |
30 * @param {!device_collection.DeviceCollection} devices | |
31 */ | |
32 setDevices: function(devices) { | |
33 this.deviceTable.setDevices(devices); | |
34 } | |
35 }; | |
36 | |
37 return { | |
38 DevicesView: DevicesView | |
39 }; | |
40 }); | |
OLD | NEW |