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

Unified Diff: chrome/browser/resources/bluetooth_internals/devices_view.js

Issue 2538653002: bluetooth: Add sidebar and page manager for chrome://bluetooth-internals. (Closed)
Patch Set: Fix header width 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 side-by-side diff with in-line comments
Download patch
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
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698