Chromium Code Reviews| 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 /** |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 * Returns a GeneralConfig for configuring gestures.* preferences. | 125 * Returns a GeneralConfig for configuring gestures.* preferences. |
| 126 * @return {object} A GeneralConfig object. | 126 * @return {object} A GeneralConfig object. |
| 127 */ | 127 */ |
| 128 function GestureConfig() { | 128 function GestureConfig() { |
| 129 /** Common prefix of gesture preferences. **/ | 129 /** Common prefix of gesture preferences. **/ |
| 130 /** @const */ var GESTURE_PREFIX = 'gesture.'; | 130 /** @const */ var GESTURE_PREFIX = 'gesture.'; |
| 131 | 131 |
| 132 /** List of fields used to dynamically build form. **/ | 132 /** List of fields used to dynamically build form. **/ |
| 133 var GESTURE_FIELDS = [ | 133 var GESTURE_FIELDS = [ |
| 134 { | 134 { |
| 135 key: 'fling_max_cancel_to_down_time_in_ms', | |
|
rjkroege
2013/01/03 22:42:49
all the remaining params are in seconds yes? shoul
mohsen
2013/01/04 16:14:22
Yes, I had noticed that point. I used ms to keep t
| |
| 136 label: 'Maximum Cancel to Down Time for Tap Suppression', | |
| 137 units: 'milliseconds', | |
| 138 }, | |
| 139 { | |
| 140 key: 'fling_max_tap_gap_time_in_ms', | |
| 141 label: 'Maximum Tap Gap Time for Tap Suppression', | |
| 142 units: 'milliseconds', | |
| 143 }, | |
| 144 { | |
| 135 key: 'long_press_time_in_seconds', | 145 key: 'long_press_time_in_seconds', |
| 136 label: 'Long Press Time', | 146 label: 'Long Press Time', |
| 137 units: 'seconds' | 147 units: 'seconds' |
| 138 }, | 148 }, |
| 139 { | 149 { |
| 140 key: 'semi_long_press_time_in_seconds', | 150 key: 'semi_long_press_time_in_seconds', |
| 141 label: 'Semi Long Press Time', | 151 label: 'Semi Long Press Time', |
| 142 units: 'seconds' | 152 units: 'seconds' |
| 143 }, | 153 }, |
| 144 { | 154 { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 $(prefName).value = value; | 335 $(prefName).value = value; |
| 326 } | 336 } |
| 327 | 337 |
| 328 return { | 338 return { |
| 329 initialize: initialize, | 339 initialize: initialize, |
| 330 getPreferenceValueResult: getPreferenceValueResult | 340 getPreferenceValueResult: getPreferenceValueResult |
| 331 }; | 341 }; |
| 332 })(); | 342 })(); |
| 333 | 343 |
| 334 document.addEventListener('DOMContentLoaded', gesture_config.initialize); | 344 document.addEventListener('DOMContentLoaded', gesture_config.initialize); |
| OLD | NEW |