| OLD | NEW |
| 1 // Copyright 2015 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 | 6 * @fileoverview |
| 7 * 'settings-a11y-page' is the settings page containing accessibility | 7 * 'settings-manage-a11y-page' is the subpage with the accessibility |
| 8 * settings. | 8 * settings. |
| 9 * | |
| 10 * Example: | |
| 11 * | |
| 12 * <iron-animated-pages> | |
| 13 * <settings-a11y-page prefs="{{prefs}}"></settings-a11y-page> | |
| 14 * ... other pages ... | |
| 15 * </iron-animated-pages> | |
| 16 */ | 9 */ |
| 17 Polymer({ | 10 Polymer({ |
| 18 is: 'settings-a11y-page', | 11 is: 'settings-manage-a11y-page', |
| 19 | 12 |
| 20 properties: { | 13 properties: { |
| 21 /** | 14 /** |
| 22 * Preferences state. | 15 * Preferences state. |
| 23 */ | 16 */ |
| 24 prefs: { | 17 prefs: { |
| 25 type: Object, | 18 type: Object, |
| 26 notify: true, | 19 notify: true, |
| 27 }, | 20 }, |
| 28 | 21 |
| 29 <if expr="chromeos"> | |
| 30 autoClickDelayOptions_: { | 22 autoClickDelayOptions_: { |
| 31 readOnly: true, | 23 readOnly: true, |
| 32 type: Array, | 24 type: Array, |
| 33 value: function() { | 25 value: function() { |
| 34 return [ | 26 return [ |
| 35 {value: 600, | 27 {value: 600, |
| 36 name: loadTimeData.getString('delayBeforeClickExtremelyShort')}, | 28 name: loadTimeData.getString('delayBeforeClickExtremelyShort')}, |
| 37 {value: 800, | 29 {value: 800, |
| 38 name: loadTimeData.getString('delayBeforeClickVeryShort')}, | 30 name: loadTimeData.getString('delayBeforeClickVeryShort')}, |
| 39 {value: 1000, | 31 {value: 1000, |
| 40 name: loadTimeData.getString('delayBeforeClickShort')}, | 32 name: loadTimeData.getString('delayBeforeClickShort')}, |
| 41 {value: 2000, | 33 {value: 2000, |
| 42 name: loadTimeData.getString('delayBeforeClickLong')}, | 34 name: loadTimeData.getString('delayBeforeClickLong')}, |
| 43 {value: 4000, | 35 {value: 4000, |
| 44 name: loadTimeData.getString('delayBeforeClickVeryLong')}, | 36 name: loadTimeData.getString('delayBeforeClickVeryLong')}, |
| 45 ]; | 37 ]; |
| 46 }, | 38 }, |
| 47 }, | 39 }, |
| 48 | 40 |
| 49 /** | 41 /** |
| 50 * Whether to show experimental accessibility features. | 42 * Whether to show experimental accessibility features. |
| 51 * @private {boolean} | 43 * @private {boolean} |
| 52 */ | 44 */ |
| 53 showExperimentalFeatures_: { | 45 showExperimentalFeatures_: { |
| 54 type: Boolean, | 46 type: Boolean, |
| 55 value: function() { | 47 value: function() { |
| 56 return loadTimeData.getBoolean('showExperimentalA11yFeatures'); | 48 return loadTimeData.getBoolean('showExperimentalA11yFeatures'); |
| 57 }, | 49 }, |
| 58 } | 50 }, |
| 59 </if> | |
| 60 }, | 51 }, |
| 61 | 52 |
| 62 /** @private */ | 53 /** @private */ |
| 54 onChromeVoxSettingsTap_: function() { |
| 55 chrome.send('showChromeVoxSettings'); |
| 56 }, |
| 57 |
| 58 /** @private */ |
| 59 onDisplayTap_: function() { |
| 60 settings.navigateTo(settings.Route.DISPLAY); |
| 61 }, |
| 62 |
| 63 /** @private */ |
| 64 onAppearanceTap_: function() { |
| 65 settings.navigateTo(settings.Route.APPEARANCE); |
| 66 }, |
| 67 |
| 68 /** @private */ |
| 69 onKeyboardTap_: function() { |
| 70 settings.navigateTo(settings.Route.KEYBOARD); |
| 71 }, |
| 72 |
| 73 /** @private */ |
| 74 onMouseTap_: function() { |
| 75 settings.navigateTo(settings.Route.POINTERS); |
| 76 }, |
| 77 |
| 78 /** @private */ |
| 63 onMoreFeaturesTap_: function() { | 79 onMoreFeaturesTap_: function() { |
| 64 window.open( | 80 window.open( |
| 65 'https://chrome.google.com/webstore/category/collection/accessibility'); | 81 'https://chrome.google.com/webstore/category/collection/accessibility'); |
| 66 }, | 82 }, |
| 67 }); | 83 }); |
| OLD | NEW |