| OLD | NEW |
| 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 * @fileoverview 'settings-device-page' is the settings page for device and | 6 * @fileoverview 'settings-device-page' is the settings page for device and |
| 7 * peripheral settings. | 7 * peripheral settings. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-device-page', | 10 is: 'settings-device-page', |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 * Whether power status and settings should be fetched and displayed. | 44 * Whether power status and settings should be fetched and displayed. |
| 45 * @private | 45 * @private |
| 46 */ | 46 */ |
| 47 enablePowerSettings_: { | 47 enablePowerSettings_: { |
| 48 type: Boolean, | 48 type: Boolean, |
| 49 value: function() { | 49 value: function() { |
| 50 return loadTimeData.getBoolean('enablePowerSettings'); | 50 return loadTimeData.getBoolean('enablePowerSettings'); |
| 51 }, | 51 }, |
| 52 readOnly: true, | 52 readOnly: true, |
| 53 }, | 53 }, |
| 54 |
| 55 /** @private {!Map<string, string>} */ |
| 56 focusConfig_: { |
| 57 type: Object, |
| 58 value: function() { |
| 59 var map = new Map(); |
| 60 map.set( |
| 61 settings.Route.POINTERS.path, '#pointersRow .subpage-arrow'); |
| 62 map.set( |
| 63 settings.Route.KEYBOARD.path, '#keyboardRow .subpage-arrow'); |
| 64 map.set( |
| 65 settings.Route.STYLUS.path, '#stylusRow .subpage-arrow'); |
| 66 map.set( |
| 67 settings.Route.DISPLAY.path, '#displayRow .subpage-arrow'); |
| 68 map.set( |
| 69 settings.Route.STORAGE.path, '#storageRow .subpage-arrow'); |
| 70 map.set( |
| 71 settings.Route.POWER.path, '#powerRow .subpage-arrow'); |
| 72 return map; |
| 73 }, |
| 74 }, |
| 54 }, | 75 }, |
| 55 | 76 |
| 56 observers: [ | 77 observers: [ |
| 57 'pointersChanged_(hasMouse_, hasTouchpad_)', | 78 'pointersChanged_(hasMouse_, hasTouchpad_)', |
| 58 ], | 79 ], |
| 59 | 80 |
| 60 /** @override */ | 81 /** @override */ |
| 61 attached: function() { | 82 attached: function() { |
| 62 this.addWebUIListener( | 83 this.addWebUIListener( |
| 63 'has-mouse-changed', this.set.bind(this, 'hasMouse_')); | 84 'has-mouse-changed', this.set.bind(this, 'hasMouse_')); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 * @private | 173 * @private |
| 153 */ | 174 */ |
| 154 checkPointerSubpage_: function() { | 175 checkPointerSubpage_: function() { |
| 155 // Check that the properties have explicitly been set to false. | 176 // Check that the properties have explicitly been set to false. |
| 156 if (this.hasMouse_ === false && this.hasTouchpad_ === false && | 177 if (this.hasMouse_ === false && this.hasTouchpad_ === false && |
| 157 settings.getCurrentRoute() == settings.Route.POINTERS) { | 178 settings.getCurrentRoute() == settings.Route.POINTERS) { |
| 158 settings.navigateTo(settings.Route.DEVICE); | 179 settings.navigateTo(settings.Route.DEVICE); |
| 159 } | 180 } |
| 160 }, | 181 }, |
| 161 }); | 182 }); |
| OLD | NEW |