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 DevicesPage and DevicesView, served from |
| 7 * chrome://bluetooth-internals/. |
| 8 */ |
| 9 |
| 10 cr.define('devices_page', function() { |
| 11 /** @const */ var Page = cr.ui.pageManager.Page; |
| 12 |
| 13 /** |
| 14 * Page that contains a header and a DevicesView. |
| 15 * @constructor |
| 16 * @extends {cr.ui.pageManager.Page} |
| 17 */ |
| 18 function DevicesPage() { |
| 19 Page.call(this, 'devices', 'Devices', 'devices'); |
| 20 |
| 21 this.deviceTable = new device_table.DeviceTable(); |
| 22 this.pageDiv.appendChild(this.deviceTable); |
| 23 } |
| 24 |
| 25 DevicesPage.prototype = { |
| 26 __proto__: Page.prototype, |
| 27 |
| 28 /** |
| 29 * Sets the device collection for the page's device table. |
| 30 * @param {!device_collection.DeviceCollection} devices |
| 31 */ |
| 32 setDevices: function(devices) { |
| 33 this.deviceTable.setDevices(devices); |
| 34 } |
| 35 }; |
| 36 |
| 37 return { |
| 38 DevicesPage: DevicesPage |
| 39 }; |
| 40 }); |
OLD | NEW |