Index: chrome/browser/resources/bluetooth_internals/devices_view.js |
diff --git a/chrome/browser/resources/bluetooth_internals/devices_view.js b/chrome/browser/resources/bluetooth_internals/devices_view.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..85b882a4d4fd060133f7970bc5b58344906f0312 |
--- /dev/null |
+++ b/chrome/browser/resources/bluetooth_internals/devices_view.js |
@@ -0,0 +1,40 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * Javascript for DevicesView, served from chrome://bluetooth-internals/. |
+ */ |
+ |
+cr.define('devices_view', function() { |
+ /** @const */ var Page = cr.ui.pageManager.Page; |
+ |
+ /** |
+ * 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.
|
+ * @constructor |
+ * @extends {cr.ui.pageManager.Page} |
+ */ |
+ function DevicesView() { |
+ Page.call(this, 'devices', 'Devices', 'devices'); |
+ this.deviceTable = new device_table.DeviceTable(); |
+ this.pageDiv.appendChild(this.deviceTable); |
+ } |
+ |
+ cr.addSingletonGetter(DevicesView); |
+ |
+ DevicesView.prototype = { |
+ __proto__: Page.prototype, |
+ |
+ /** |
+ * Sets the device table's device collection. |
+ * @param {!device_collection.DeviceCollection} devices |
+ */ |
+ setDevices: function(devices) { |
+ this.deviceTable.setDevices(devices); |
+ } |
+ }; |
+ |
+ return { |
+ DevicesView: DevicesView |
+ }; |
+}); |