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

Unified Diff: content/browser/renderer_host/input/fling/fling_curve_impl.cc

Issue 43503002: Remove fling curve profiles from renderer preferences assuming that be turn on Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gesture_prefs_observer_factory_aura.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/ui/gesture_prefs_observer_factory_aura.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698