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 #ifndef UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_ | 5 #ifndef UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_ |
6 #define UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_ | 6 #define UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ui/base/ui_export.h" | 9 #include "ui/base/ui_export.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 // TODO: Expand this design to support multiple OS configuration | 13 // TODO: Expand this design to support multiple OS configuration |
14 // approaches (windows, chrome, others). This would turn into an | 14 // approaches (windows, chrome, others). This would turn into an |
15 // abstract base class. | 15 // abstract base class. |
16 | 16 |
17 class UI_EXPORT GestureConfiguration { | 17 class UI_EXPORT GestureConfiguration { |
18 public: | 18 public: |
19 // Ordered alphabetically ignoring underscores, to align with the | 19 // Ordered alphabetically ignoring underscores, to align with the |
20 // associated list of prefs in gesture_prefs_aura.cc. | 20 // associated list of prefs in gesture_prefs_aura.cc. |
21 static int default_radius() { | 21 static int default_radius() { |
22 return default_radius_; | 22 return default_radius_; |
23 } | 23 } |
| 24 static void set_default_radius(int radius) { default_radius_ = radius; } |
24 static double long_press_time_in_seconds() { | 25 static double long_press_time_in_seconds() { |
25 return long_press_time_in_seconds_; | 26 return long_press_time_in_seconds_; |
26 } | 27 } |
27 static double semi_long_press_time_in_seconds() { | 28 static double semi_long_press_time_in_seconds() { |
28 return semi_long_press_time_in_seconds_; | 29 return semi_long_press_time_in_seconds_; |
29 } | 30 } |
30 static double max_distance_for_two_finger_tap_in_pixels() { | 31 static double max_distance_for_two_finger_tap_in_pixels() { |
31 return max_distance_for_two_finger_tap_in_pixels_; | 32 return max_distance_for_two_finger_tap_in_pixels_; |
32 } | 33 } |
33 static void set_max_distance_for_two_finger_tap_in_pixels(double val) { | 34 static void set_max_distance_for_two_finger_tap_in_pixels(double val) { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 static int points_buffered_for_velocity_; | 169 static int points_buffered_for_velocity_; |
169 static double rail_break_proportion_; | 170 static double rail_break_proportion_; |
170 static double rail_start_proportion_; | 171 static double rail_start_proportion_; |
171 | 172 |
172 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); | 173 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); |
173 }; | 174 }; |
174 | 175 |
175 } // namespace ui | 176 } // namespace ui |
176 | 177 |
177 #endif // UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_ | 178 #endif // UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_ |
OLD | NEW |