Index: content/browser/renderer_host/input/fling/fling_curve_impl.cc |
diff --git a/content/browser/renderer_host/input/fling/fling_curve_impl.cc b/content/browser/renderer_host/input/fling/fling_curve_impl.cc |
index 53e4115fb8524266224e23f3839f16b454452bd6..fb0b75006e0bf01fad30ca33bd249dbf4c4eb5a0 100644 |
--- a/content/browser/renderer_host/input/fling/fling_curve_impl.cc |
+++ b/content/browser/renderer_host/input/fling/fling_curve_impl.cc |
@@ -156,10 +156,21 @@ FlingCurve* FlingCurve::Create(WebKit::WebGestureEvent::SourceDevice source, |
const gfx::PointF& velocity, |
const gfx::Point& cumulative_scroll) { |
FlingCurveConfiguration config; |
- // TODO(varunjain): Set these parameters from actual preferences. |
- content::RendererPreferences def_prefs; |
- config.SetCurveParameters(def_prefs.touchpad_fling_profile, |
- def_prefs.touchscreen_fling_profile); |
+ static const float touchpad_profile[] = { |
+ ui::GestureConfiguration::touchpad_fling_curve_alpha(), |
+ ui::GestureConfiguration::touchpad_fling_curve_beta(), |
+ ui::GestureConfiguration::touchpad_fling_curve_gamma() |
+ }; |
+ static const float touchscreen_profile[] = { |
+ ui::GestureConfiguration::touchscreen_fling_curve_alpha(), |
+ ui::GestureConfiguration::touchscreen_fling_curve_beta(), |
+ ui::GestureConfiguration::touchscreen_fling_curve_gamma() |
+ }; |
+ static const std::vector<float> touchpad_profile_vec(touchpad_profile, |
+ touchpad_profile + 3); |
+ static const std::vector<float> touchscreen_profile_vec(touchscreen_profile, |
+ touchscreen_profile + 3); |
+ config.SetCurveParameters(touchpad_profile_vec, touchscreen_profile_vec); |
if (source == WebKit::WebGestureEvent::Touchscreen) |
return config.CreateForTouchScreen(velocity, cumulative_scroll); |
return config.CreateForTouchPad(velocity, cumulative_scroll); |