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

Side by Side Diff: chrome/browser/resources/chromeos/emulator/input_device_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
(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 Polymer({
6 is: 'input-device-settings',
7
8 behaviors: [Polymer.NeonAnimatableBehavior],
9
10 /**
11 * @param {!Event} e
12 * Callback when the user toggles the touchpad.
13 */
14 onTouchpadChange: function(e) {
15 chrome.send('setHasTouchpad', [e.target.checked]);
16 this.$.changeDescription.opened = true;
17 },
18
19 /**
20 * @param {!Event} e
21 * Callback when the user toggles the mouse.
22 */
23 onMouseChange: function(e) {
24 chrome.send('setHasMouse', [e.target.checked]);
25 this.$.changeDescription.opened = true;
26 },
27
28 /**
29 * Callback when the existence of a fake mouse changes.
30 * @param {boolean} exists
31 */
32 setMouseExists: function(exists) {
33 this.$.mouse.checked = exists;
34 },
35
36 /**
37 * Callback when the existence of a fake touchpad changes.
38 * @param {boolean} exists
39 */
40 setTouchpadExists: function(exists) {
41 this.$.touchpad.checked = exists;
42 },
43 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698