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 // Redefine '$' here rather than including 'cr.js', since this is | 5 // Redefine '$' here rather than including 'cr.js', since this is |
6 // the only function needed. This allows this file to be loaded | 6 // the only function needed. This allows this file to be loaded |
7 // in a browser directly for layout and some testing purposes. | 7 // in a browser directly for layout and some testing purposes. |
8 var $ = function(id) { return document.getElementById(id); }; | 8 var $ = function(id) { return document.getElementById(id); }; |
9 | 9 |
10 /** | 10 /** |
11 * WebUI for configuring gesture.* preference values used by | 11 * WebUI for configuring gesture.* preference values used by |
12 * Chrome's gesture recognition system. | 12 * Chrome's gesture recognition system. |
13 */ | 13 */ |
14 var gesture_config = (function() { | 14 var gesture_config = (function() { |
15 'use strict'; | 15 'use strict'; |
16 | 16 |
17 /** Common prefix of gesture preferences. **/ | 17 /** Common prefix of gesture preferences. **/ |
18 /** @const */ var GESTURE_PREFIX = 'gesture.'; | 18 /** @const */ var GESTURE_PREFIX = 'gesture.'; |
19 | 19 |
20 /** List of fields used to dynamically build form. **/ | 20 /** List of fields used to dynamically build form. **/ |
21 var FIELDS = [ | 21 var FIELDS = [ |
22 { | 22 { |
23 key: 'long_press_time_in_seconds', | 23 key: 'long_press_time_in_seconds', |
24 label: 'Long Press Time', | 24 label: 'Long Press Time', |
25 units: 'seconds', | 25 units: 'seconds', |
26 default: 1.0 | 26 default: 1.0 |
27 }, | 27 }, |
28 { | 28 { |
| 29 key: 'semi_long_press_time_in_seconds', |
| 30 label: 'Semi Long Press Time', |
| 31 units: 'seconds', |
| 32 default: 0.5 |
| 33 }, |
| 34 { |
29 key: 'max_seconds_between_double_click', | 35 key: 'max_seconds_between_double_click', |
30 label: 'Maximum Double Click Interval', | 36 label: 'Maximum Double Click Interval', |
31 units: 'seconds', | 37 units: 'seconds', |
32 step: 0.1, | 38 step: 0.1, |
33 default: 0.7 | 39 default: 0.7 |
34 }, | 40 }, |
35 { | 41 { |
36 key: 'max_separation_for_gesture_touches_in_pixels', | 42 key: 'max_separation_for_gesture_touches_in_pixels', |
37 label: 'Maximum Separation for Gesture Touches', | 43 label: 'Maximum Separation for Gesture Touches', |
38 units: 'pixels', | 44 units: 'pixels', |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 $('reset-button').onclick = onReset.bind(this); | 229 $('reset-button').onclick = onReset.bind(this); |
224 } | 230 } |
225 | 231 |
226 return { | 232 return { |
227 initialize: initialize, | 233 initialize: initialize, |
228 getPreferenceValueResult: getPreferenceValueResult | 234 getPreferenceValueResult: getPreferenceValueResult |
229 }; | 235 }; |
230 })(); | 236 })(); |
231 | 237 |
232 document.addEventListener('DOMContentLoaded', gesture_config.initialize); | 238 document.addEventListener('DOMContentLoaded', gesture_config.initialize); |
OLD | NEW |