| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 key: 'fling_max_cancel_to_down_time_in_ms', | 161 key: 'fling_max_cancel_to_down_time_in_ms', |
| 162 label: 'Maximum Cancel to Down Time for Tap Suppression', | 162 label: 'Maximum Cancel to Down Time for Tap Suppression', |
| 163 units: 'milliseconds', | 163 units: 'milliseconds', |
| 164 }, | 164 }, |
| 165 { | 165 { |
| 166 key: 'fling_max_tap_gap_time_in_ms', | 166 key: 'fling_max_tap_gap_time_in_ms', |
| 167 label: 'Maximum Tap Gap Time for Tap Suppression', | 167 label: 'Maximum Tap Gap Time for Tap Suppression', |
| 168 units: 'milliseconds', | 168 units: 'milliseconds', |
| 169 }, | 169 }, |
| 170 { | 170 { |
| 171 key: 'long_press_time_in_seconds', | |
| 172 label: 'Long Press Time', | |
| 173 units: 'seconds' | |
| 174 }, | |
| 175 { | |
| 176 key: 'semi_long_press_time_in_seconds', | 171 key: 'semi_long_press_time_in_seconds', |
| 177 label: 'Semi Long Press Time', | 172 label: 'Semi Long Press Time', |
| 178 units: 'seconds', | 173 units: 'seconds', |
| 179 step: 0.1 | 174 step: 0.1 |
| 180 }, | 175 }, |
| 181 { | 176 { |
| 182 key: 'show_press_delay_in_ms', | |
| 183 label: 'Delay before show press event is fired', | |
| 184 units: 'milliseconds', | |
| 185 }, | |
| 186 { | |
| 187 key: 'max_seconds_between_double_click', | |
| 188 label: 'Maximum Double Click Interval', | |
| 189 units: 'seconds', | |
| 190 step: 0.1 | |
| 191 }, | |
| 192 { | |
| 193 key: 'max_separation_for_gesture_touches_in_pixels', | 177 key: 'max_separation_for_gesture_touches_in_pixels', |
| 194 label: 'Maximum Separation for Gesture Touches', | 178 label: 'Maximum Separation for Gesture Touches', |
| 195 units: 'pixels' | 179 units: 'pixels' |
| 196 }, | 180 }, |
| 197 { | 181 { |
| 198 key: 'max_swipe_deviation_ratio', | |
| 199 label: 'Maximum Swipe Deviation', | |
| 200 units: '' | |
| 201 }, | |
| 202 { | |
| 203 key: 'max_touch_down_duration_in_seconds_for_click', | |
| 204 label: 'Maximum Touch-Down Duration for Click', | |
| 205 units: 'seconds', | |
| 206 step: 0.1 | |
| 207 }, | |
| 208 { | |
| 209 key: 'max_touch_move_in_pixels_for_click', | |
| 210 label: 'Maximum Touch-Move for Click', | |
| 211 units: 'pixels' | |
| 212 }, | |
| 213 { | |
| 214 key: 'max_distance_between_taps_for_double_tap', | |
| 215 label: 'Maximum Distance between two taps for Double Tap', | |
| 216 units: 'pixels' | |
| 217 }, | |
| 218 { | |
| 219 key: 'min_distance_for_pinch_scroll_in_pixels', | |
| 220 label: 'Minimum Distance for Pinch Scroll', | |
| 221 units: 'pixels' | |
| 222 }, | |
| 223 { | |
| 224 key: 'min_flick_speed_squared', | |
| 225 label: 'Minimum Flick Speed Squared', | |
| 226 units: '(pixels/sec.)<sup>2</sup>' | |
| 227 }, | |
| 228 { | |
| 229 key: 'min_pinch_update_distance_in_pixels', | |
| 230 label: 'Minimum Pinch Update Distance', | |
| 231 units: 'pixels' | |
| 232 }, | |
| 233 { | |
| 234 key: 'min_rail_break_velocity', | |
| 235 label: 'Minimum Rail-Break Velocity', | |
| 236 units: 'pixels/sec.' | |
| 237 }, | |
| 238 { | |
| 239 key: 'min_scroll_delta_squared', | |
| 240 label: 'Minimum Scroll Delta Squared', | |
| 241 units: '' | |
| 242 }, | |
| 243 { | |
| 244 key: 'scroll_prediction_seconds', | |
| 245 label: 'Scroll prediction interval<br>' + | |
| 246 '(Enable scroll prediction in ' + | |
| 247 '<a href="chrome://flags">chrome://flags</a>)', | |
| 248 units: 'seconds', | |
| 249 step: 0.01 | |
| 250 }, | |
| 251 { | |
| 252 key: 'min_swipe_speed', | |
| 253 label: 'Minimum Swipe Speed', | |
| 254 units: 'pixels/sec.' | |
| 255 }, | |
| 256 { | |
| 257 key: 'min_touch_down_duration_in_seconds_for_click', | |
| 258 label: 'Minimum Touch-Down Duration for Click', | |
| 259 units: 'seconds', | |
| 260 step: 0.01 | |
| 261 }, | |
| 262 { | |
| 263 key: 'points_buffered_for_velocity', | |
| 264 label: 'Points Buffered for Velocity', | |
| 265 units: '', | |
| 266 step: 1 | |
| 267 }, | |
| 268 { | |
| 269 key: 'rail_break_proportion', | |
| 270 label: 'Rail-Break Proportion', | |
| 271 units: '%' | |
| 272 }, | |
| 273 { | |
| 274 key: 'rail_start_proportion', | |
| 275 label: 'Rail-Start Proportion', | |
| 276 units: '%' | |
| 277 }, | |
| 278 { | |
| 279 key: 'fling_acceleration_curve_coefficient_0', | 182 key: 'fling_acceleration_curve_coefficient_0', |
| 280 label: 'Touchscreen Fling Acceleration', | 183 label: 'Touchscreen Fling Acceleration', |
| 281 units: 'x<sup>3</sup>', | 184 units: 'x<sup>3</sup>', |
| 282 min: '-1' | 185 min: '-1' |
| 283 }, | 186 }, |
| 284 { | 187 { |
| 285 key: 'fling_acceleration_curve_coefficient_1', | 188 key: 'fling_acceleration_curve_coefficient_1', |
| 286 label: '+', | 189 label: '+', |
| 287 units: 'x<sup>2</sup>', | 190 units: 'x<sup>2</sup>', |
| 288 min: '-1' | 191 min: '-1' |
| 289 }, | 192 }, |
| 290 { | 193 { |
| 291 key: 'fling_acceleration_curve_coefficient_2', | 194 key: 'fling_acceleration_curve_coefficient_2', |
| 292 label: '+', | 195 label: '+', |
| 293 units: 'x<sup>1</sup>', | 196 units: 'x<sup>1</sup>', |
| 294 min: '-1' | 197 min: '-1' |
| 295 }, | 198 }, |
| 296 { | 199 { |
| 297 key: 'fling_acceleration_curve_coefficient_3', | 200 key: 'fling_acceleration_curve_coefficient_3', |
| 298 label: '+', | 201 label: '+', |
| 299 units: 'x<sup>0</sup>', | 202 units: 'x<sup>0</sup>', |
| 300 min: '-1' | 203 min: '-1' |
| 301 }, | 204 }, |
| 302 { | 205 { |
| 303 key: 'fling_velocity_cap', | |
| 304 label: 'Touchscreen Fling Velocity Cap', | |
| 305 units: 'pixels / second' | |
| 306 }, | |
| 307 { | |
| 308 key: 'tab_scrub_activation_delay_in_ms', | 206 key: 'tab_scrub_activation_delay_in_ms', |
| 309 label: 'Tab scrub auto activation delay, (-1 for never)', | 207 label: 'Tab scrub auto activation delay, (-1 for never)', |
| 310 units: 'milliseconds' | 208 units: 'milliseconds' |
| 311 } | 209 } |
| 312 ]; | 210 ]; |
| 313 | 211 |
| 314 return new GeneralConfig(GESTURE_TITLE, GESTURE_PREFIX, GESTURE_FIELDS); | 212 return new GeneralConfig(GESTURE_TITLE, GESTURE_PREFIX, GESTURE_FIELDS); |
| 315 } | 213 } |
| 316 | 214 |
| 317 /** | 215 /** |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 */ | 391 */ |
| 494 updatePreferenceValueResult: function(prefName, value, isDefault) { | 392 updatePreferenceValueResult: function(prefName, value, isDefault) { |
| 495 prefName = prefName.substring(prefName.indexOf('.') + 1); | 393 prefName = prefName.substring(prefName.indexOf('.') + 1); |
| 496 $(prefName).value = value; | 394 $(prefName).value = value; |
| 497 this.updateResetButton($(prefName + '-reset'), isDefault); | 395 this.updateResetButton($(prefName + '-reset'), isDefault); |
| 498 this.updateResetAllButton(this.areAllPrefsSetToDefault()); | 396 this.updateResetAllButton(this.areAllPrefsSetToDefault()); |
| 499 }, | 397 }, |
| 500 }; | 398 }; |
| 501 | 399 |
| 502 document.addEventListener('DOMContentLoaded', gesture_config.initialize); | 400 document.addEventListener('DOMContentLoaded', gesture_config.initialize); |
| OLD | NEW |