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

Side by Side Diff: chrome/browser/resources/chromeos/emulator/bluetooth_settings.js

Issue 2006083002: Use fake Input Device Settings with chrome://device-emulator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DevicePageTestsFixes
Patch Set: make dependent on a11y fix Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * A bluetooth device. 6 * A bluetooth device.
7 * @constructor 7 * @constructor
8 */ 8 */
9 var BluetoothDevice = function() { 9 var BluetoothDevice = function() {
10 // The device's address (MAC format, must be unique). 10 // The device's address (MAC format, must be unique).
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }, 126 },
127 }, 127 },
128 128
129 /** 129 /**
130 * Contains keys for all the device paths which have been discovered. Used 130 * Contains keys for all the device paths which have been discovered. Used
131 * to look up whether or not a device is listed already. 131 * to look up whether or not a device is listed already.
132 * @type {Object} 132 * @type {Object}
133 */ 133 */
134 devicePaths: {}, 134 devicePaths: {},
135 135
136 ready: function() { this.title = 'Bluetooth'; }, 136 ready: function() {
137 137 chrome.send('requestBluetoothInfo');
138 initialize: function() {
139 if (!this.initialized) {
140 this.initialized = true;
141 chrome.send('requestBluetoothInfo');
142 }
143 }, 138 },
144 139
145 observers: ['currentEditableObjectChanged(currentEditableObject.*)'], 140 observers: ['currentEditableObjectChanged(currentEditableObject.*)'],
146 141
147 /** 142 /**
148 * Called when a property of the currently editable object is edited. 143 * Called when a property of the currently editable object is edited.
149 * Sets the corresponding property for the object in |this.devices|. 144 * Sets the corresponding property for the object in |this.devices|.
150 * @param {Object} obj An object containing event information (ex. which 145 * @param {Object} obj An object containing event information (ex. which
151 * property of |this.currentEditableObject| was changed, what its value 146 * property of |this.currentEditableObject| was changed, what its value
152 * is, etc.) 147 * is, etc.)
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 * @return {number} The value which |classText| represents. 510 * @return {number} The value which |classText| represents.
516 */ 511 */
517 getValueForDeviceClass: function(classText) { 512 getValueForDeviceClass: function(classText) {
518 for (var i = 0; i < this.deviceClassOptions.length; ++i) { 513 for (var i = 0; i < this.deviceClassOptions.length; ++i) {
519 if (this.deviceClassOptions[i].text == classText) 514 if (this.deviceClassOptions[i].text == classText)
520 return this.deviceClassOptions[i].value; 515 return this.deviceClassOptions[i].value;
521 } 516 }
522 return 0; 517 return 0;
523 }, 518 },
524 }); 519 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698