| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Auto-repeat delays (in ms) for the corresponding slider values, from | 8 * Auto-repeat delays (in ms) for the corresponding slider values, from |
| 9 * long to short. The values were chosen to provide a large range while giving | 9 * long to short. The values were chosen to provide a large range while giving |
| 10 * several options near the defaults. | 10 * several options near the defaults. |
| 11 * @type {!Array.<number>} | 11 * @type {!Array.<number>} |
| 12 * @const | 12 * @const |
| 13 */ | 13 */ |
| 14 var AUTO_REPEAT_DELAYS = | 14 var AUTO_REPEAT_DELAYS = |
| 15 [2000, 1500, 1000, 500, 300, 200, 150]; | 15 [2000, 1500, 1000, 500, 300, 200, 150]; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Auto-repeat intervals (in ms) for the corresponding slider values, from | 18 * Auto-repeat intervals (in ms) for the corresponding slider values, from |
| 19 * long to short. The slider itself is labeled "rate", the inverse of | 19 * long to short. The slider itself is labeled "rate", the inverse of |
| 20 * interval, and goes from slow (long interval) to fast (short interval). | 20 * interval, and goes from slow (long interval) to fast (short interval). |
| 21 * @type {!Array.<number>} | 21 * @type {!Array.<number>} |
| 22 * @const | 22 * @const |
| 23 */ | 23 */ |
| 24 var AUTO_REPEAT_INTERVALS = | 24 var AUTO_REPEAT_INTERVALS = |
| 25 [2000, 1000, 500, 300, 200, 100, 50, 30, 20]; | 25 [2000, 1000, 500, 300, 200, 100, 50, 30, 20]; |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Encapsulated handling of the keyboard overlay. | 28 * Encapsulated handling of the keyboard overlay. |
| 29 * @constructor | 29 * @constructor |
| 30 * @extends {options.SettingsDialog} |
| 30 */ | 31 */ |
| 31 function KeyboardOverlay() { | 32 function KeyboardOverlay() { |
| 32 options.SettingsDialog.call(this, 'keyboard-overlay', | 33 options.SettingsDialog.call(this, 'keyboard-overlay', |
| 33 loadTimeData.getString('keyboardOverlayTabTitle'), | 34 loadTimeData.getString('keyboardOverlayTabTitle'), |
| 34 'keyboard-overlay', | 35 'keyboard-overlay', |
| 35 $('keyboard-confirm'), $('keyboard-cancel')); | 36 $('keyboard-confirm'), $('keyboard-cancel')); |
| 36 } | 37 } |
| 37 | 38 |
| 38 cr.addSingletonGetter(KeyboardOverlay); | 39 cr.addSingletonGetter(KeyboardOverlay); |
| 39 | 40 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 var instance = KeyboardOverlay.getInstance(); | 169 var instance = KeyboardOverlay.getInstance(); |
| 169 return instance[name + '_'].apply(instance, arguments); | 170 return instance[name + '_'].apply(instance, arguments); |
| 170 }; | 171 }; |
| 171 }); | 172 }); |
| 172 | 173 |
| 173 // Export | 174 // Export |
| 174 return { | 175 return { |
| 175 KeyboardOverlay: KeyboardOverlay | 176 KeyboardOverlay: KeyboardOverlay |
| 176 }; | 177 }; |
| 177 }); | 178 }); |
| OLD | NEW |