Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: ui/base/gestures/gesture_configuration.h

Issue 11299276: Bound the maximum touchscreen fling velocity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review nits Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/base/gestures/gesture_configuration.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 static void set_rail_start_proportion(double val) { 143 static void set_rail_start_proportion(double val) {
144 rail_start_proportion_ = val; 144 rail_start_proportion_ = val;
145 } 145 }
146 static void set_fling_acceleration_curve_coefficients(int i, float val) { 146 static void set_fling_acceleration_curve_coefficients(int i, float val) {
147 fling_acceleration_curve_coefficients_[i] = val; 147 fling_acceleration_curve_coefficients_[i] = val;
148 } 148 }
149 static float fling_acceleration_curve_coefficients(int i) { 149 static float fling_acceleration_curve_coefficients(int i) {
150 return fling_acceleration_curve_coefficients_[i]; 150 return fling_acceleration_curve_coefficients_[i];
151 } 151 }
152 static float fling_velocity_cap() {
153 return fling_velocity_cap_;
154 }
155 static void set_fling_velocity_cap(float val) {
156 fling_velocity_cap_ = val;
157 }
152 158
153 private: 159 private:
154 // These are listed in alphabetical order ignoring underscores, to 160 // These are listed in alphabetical order ignoring underscores, to
155 // align with the associated list of preferences in 161 // align with the associated list of preferences in
156 // gesture_prefs_aura.cc. These two lists should be kept in sync. 162 // gesture_prefs_aura.cc. These two lists should be kept in sync.
157 163
158 // The default touch radius length used when the only information given 164 // The default touch radius length used when the only information given
159 // by the device is the touch center. 165 // by the device is the touch center.
160 static int default_radius_; 166 static int default_radius_;
161 167
(...skipping 18 matching lines...) Expand all
180 static double min_flick_speed_squared_; 186 static double min_flick_speed_squared_;
181 static double min_pinch_update_distance_in_pixels_; 187 static double min_pinch_update_distance_in_pixels_;
182 static double min_rail_break_velocity_; 188 static double min_rail_break_velocity_;
183 static double min_scroll_delta_squared_; 189 static double min_scroll_delta_squared_;
184 static double min_swipe_speed_; 190 static double min_swipe_speed_;
185 static double min_touch_down_duration_in_seconds_for_click_; 191 static double min_touch_down_duration_in_seconds_for_click_;
186 static int points_buffered_for_velocity_; 192 static int points_buffered_for_velocity_;
187 static double rail_break_proportion_; 193 static double rail_break_proportion_;
188 static double rail_start_proportion_; 194 static double rail_start_proportion_;
189 static float fling_acceleration_curve_coefficients_[NumAccelParams]; 195 static float fling_acceleration_curve_coefficients_[NumAccelParams];
196 static float fling_velocity_cap_;
190 197
191 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); 198 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration);
192 }; 199 };
193 200
194 } // namespace ui 201 } // namespace ui
195 202
196 #endif // UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_ 203 #endif // UI_BASE_GESTURES_GESTURE_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/base/gestures/gesture_configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698