| 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 #ifndef UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ | 5 #ifndef UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ |
| 6 #define UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ | 6 #define UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ui/events/events_export.h" | 9 #include "ui/events/events_export.h" |
| 10 | 10 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 fling_velocity_cap_ = val; | 192 fling_velocity_cap_ = val; |
| 193 } | 193 } |
| 194 // TODO(davemoore): Move into chrome/browser/ui. | 194 // TODO(davemoore): Move into chrome/browser/ui. |
| 195 static int tab_scrub_activation_delay_in_ms() { | 195 static int tab_scrub_activation_delay_in_ms() { |
| 196 return tab_scrub_activation_delay_in_ms_; | 196 return tab_scrub_activation_delay_in_ms_; |
| 197 } | 197 } |
| 198 static void set_tab_scrub_activation_delay_in_ms(int val) { | 198 static void set_tab_scrub_activation_delay_in_ms(int val) { |
| 199 tab_scrub_activation_delay_in_ms_ = val; | 199 tab_scrub_activation_delay_in_ms_ = val; |
| 200 } | 200 } |
| 201 | 201 |
| 202 static double touchpad_fling_curve_alpha() { |
| 203 return touchpad_fling_curve_alpha_; |
| 204 } |
| 205 static void set_touchpad_fling_curve_alpha( |
| 206 double touchpad_fling_curve_alpha) { |
| 207 touchpad_fling_curve_alpha_ = touchpad_fling_curve_alpha; |
| 208 } |
| 209 static double touchpad_fling_curve_beta() { |
| 210 return touchpad_fling_curve_beta_; |
| 211 } |
| 212 static void set_touchpad_fling_curve_beta( |
| 213 double touchpad_fling_curve_beta) { |
| 214 touchpad_fling_curve_beta_ = touchpad_fling_curve_beta; |
| 215 } |
| 216 static double touchpad_fling_curve_gamma() { |
| 217 return touchpad_fling_curve_gamma_; |
| 218 } |
| 219 static void set_touchpad_fling_curve_gamma( |
| 220 double touchpad_fling_curve_gamma) { |
| 221 touchpad_fling_curve_gamma_ = touchpad_fling_curve_gamma; |
| 222 } |
| 223 static double touchscreen_fling_curve_alpha() { |
| 224 return touchscreen_fling_curve_alpha_; |
| 225 } |
| 226 static void set_touchscreen_fling_curve_alpha( |
| 227 double touchscreen_fling_curve_alpha) { |
| 228 touchscreen_fling_curve_alpha_ = touchscreen_fling_curve_alpha; |
| 229 } |
| 230 static double touchscreen_fling_curve_beta() { |
| 231 return touchscreen_fling_curve_beta_; |
| 232 } |
| 233 static void set_touchscreen_fling_curve_beta( |
| 234 double touchscreen_fling_curve_beta) { |
| 235 touchscreen_fling_curve_beta_ = touchscreen_fling_curve_beta; |
| 236 } |
| 237 static double touchscreen_fling_curve_gamma() { |
| 238 return touchscreen_fling_curve_gamma_; |
| 239 } |
| 240 static void set_touchscreen_fling_curve_gamma( |
| 241 double touchscreen_fling_curve_gamma) { |
| 242 touchscreen_fling_curve_gamma_ = touchscreen_fling_curve_gamma; |
| 243 } |
| 244 |
| 202 private: | 245 private: |
| 203 // These are listed in alphabetical order ignoring underscores, to | 246 // These are listed in alphabetical order ignoring underscores, to |
| 204 // align with the associated list of preferences in | 247 // align with the associated list of preferences in |
| 205 // gesture_prefs_aura.cc. These two lists should be kept in sync. | 248 // gesture_prefs_aura.cc. These two lists should be kept in sync. |
| 206 | 249 |
| 207 // The default touch radius length used when the only information given | 250 // The default touch radius length used when the only information given |
| 208 // by the device is the touch center. | 251 // by the device is the touch center. |
| 209 static int default_radius_; | 252 static int default_radius_; |
| 210 | 253 |
| 211 // The maximum allowed distance between two fingers for a two finger tap. If | 254 // The maximum allowed distance between two fingers for a two finger tap. If |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 static int points_buffered_for_velocity_; | 288 static int points_buffered_for_velocity_; |
| 246 static double rail_break_proportion_; | 289 static double rail_break_proportion_; |
| 247 static double rail_start_proportion_; | 290 static double rail_start_proportion_; |
| 248 static double scroll_prediction_seconds_; | 291 static double scroll_prediction_seconds_; |
| 249 static int show_press_delay_in_ms_; | 292 static int show_press_delay_in_ms_; |
| 250 static float fling_acceleration_curve_coefficients_[NumAccelParams]; | 293 static float fling_acceleration_curve_coefficients_[NumAccelParams]; |
| 251 static float fling_velocity_cap_; | 294 static float fling_velocity_cap_; |
| 252 // TODO(davemoore): Move into chrome/browser/ui. | 295 // TODO(davemoore): Move into chrome/browser/ui. |
| 253 static int tab_scrub_activation_delay_in_ms_; | 296 static int tab_scrub_activation_delay_in_ms_; |
| 254 | 297 |
| 298 // Fling curve params |
| 299 static double touchpad_fling_curve_alpha_; |
| 300 static double touchpad_fling_curve_beta_; |
| 301 static double touchpad_fling_curve_gamma_; |
| 302 static double touchscreen_fling_curve_alpha_; |
| 303 static double touchscreen_fling_curve_beta_; |
| 304 static double touchscreen_fling_curve_gamma_; |
| 305 |
| 255 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); | 306 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); |
| 256 }; | 307 }; |
| 257 | 308 |
| 258 } // namespace ui | 309 } // namespace ui |
| 259 | 310 |
| 260 #endif // UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ | 311 #endif // UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ |
| OLD | NEW |