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

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

Issue 2576603002: bluetooth: Add device details page with basic properties to internals page. (Closed)
Patch Set: Fix formatting, fix comments, fix test, change service/rssi display Created 3 years, 11 months 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 DevicesPage and DevicesView, served from 6 * Javascript for DevicesPage and DevicesView, served from
7 * chrome://bluetooth-internals/. 7 * chrome://bluetooth-internals/.
8 */ 8 */
9 9
10 cr.define('devices_page', function() { 10 cr.define('devices_page', function() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 __proto__: Page.prototype, 42 __proto__: Page.prototype,
43 43
44 /** 44 /**
45 * Sets the device collection for the page's device table. 45 * Sets the device collection for the page's device table.
46 * @param {!device_collection.DeviceCollection} devices 46 * @param {!device_collection.DeviceCollection} devices
47 */ 47 */
48 setDevices: function(devices) { 48 setDevices: function(devices) {
49 this.deviceTable.setDevices(devices); 49 this.deviceTable.setDevices(devices);
50 }, 50 },
51 51
52 /**
53 * Updates the inspect status of the given |deviceInfo| in the device table.
54 * @param {!interfaces.BluetoothDevice.DeviceInfo} deviceInfo
55 * @param {boolean} isInspecting
56 */
57 setInspecting: function(deviceInfo, isInspecting) {
58 this.deviceTable.setInspecting(deviceInfo, isInspecting);
59 },
60
52 setScanStatus: function(status) { 61 setScanStatus: function(status) {
53 switch (status) { 62 switch (status) {
54 case ScanStatus.OFF: 63 case ScanStatus.OFF:
55 this.scanBtn_.disabled = false; 64 this.scanBtn_.disabled = false;
56 this.scanBtn_.textContent = 'Start Scan'; 65 this.scanBtn_.textContent = 'Start Scan';
57 break; 66 break;
58 case ScanStatus.STARTING: 67 case ScanStatus.STARTING:
59 this.scanBtn_.disabled = true; 68 this.scanBtn_.disabled = true;
60 this.scanBtn_.textContent = 'Starting...'; 69 this.scanBtn_.textContent = 'Starting...';
61 break; 70 break;
62 case ScanStatus.ON: 71 case ScanStatus.ON:
63 this.scanBtn_.disabled = false; 72 this.scanBtn_.disabled = false;
64 this.scanBtn_.textContent = 'Stop Scan'; 73 this.scanBtn_.textContent = 'Stop Scan';
65 break; 74 break;
66 case ScanStatus.STOPPING: 75 case ScanStatus.STOPPING:
67 this.scanBtn_.disabled = true; 76 this.scanBtn_.disabled = true;
68 this.scanBtn_.textContent = 'Stopping...'; 77 this.scanBtn_.textContent = 'Stopping...';
69 break; 78 break;
70 } 79 }
71 } 80 }
72 }; 81 };
73 82
74 return { 83 return {
75 DevicesPage: DevicesPage, 84 DevicesPage: DevicesPage,
76 ScanStatus: ScanStatus, 85 ScanStatus: ScanStatus,
77 }; 86 };
78 }); 87 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698