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

Unified Diff: content/child/fling_curve_configuration.cc

Issue 586933003: fling: Remove a bunch of code for configuring fling curves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 6 years, 3 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 | « content/child/fling_curve_configuration.h ('k') | content/child/touch_fling_gesture_curve.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/fling_curve_configuration.cc
diff --git a/content/child/fling_curve_configuration.cc b/content/child/fling_curve_configuration.cc
deleted file mode 100644
index 8beeb3672c673bf3f0cd7477b220e4f87c93ddbc..0000000000000000000000000000000000000000
--- a/content/child/fling_curve_configuration.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/child/fling_curve_configuration.h"
-
-#include "base/logging.h"
-#include "content/child/touch_fling_gesture_curve.h"
-#include "third_party/WebKit/public/platform/WebGestureCurve.h"
-
-namespace content {
-
-FlingCurveConfiguration::FlingCurveConfiguration() { }
-
-FlingCurveConfiguration::~FlingCurveConfiguration() { }
-
-void FlingCurveConfiguration::SetCurveParameters(
- const std::vector<float>& new_touchpad,
- const std::vector<float>& new_touchscreen) {
- DCHECK(new_touchpad.size() >= 3);
- DCHECK(new_touchscreen.size() >= 3);
- base::AutoLock scoped_lock(lock_);
- touchpad_coefs_ = new_touchpad;
- touchscreen_coefs_ = new_touchscreen;
-}
-
-blink::WebGestureCurve* FlingCurveConfiguration::CreateCore(
- const std::vector<float>& coefs,
- const blink::WebFloatPoint& velocity,
- const blink::WebSize& cumulativeScroll) {
- float p0, p1, p2;
-
- {
- base::AutoLock scoped_lock(lock_);
- p0 = coefs[0];
- p1 = coefs[1];
- p2 = coefs[2];
- }
-
- return TouchFlingGestureCurve::Create(velocity, p0, p1, p2,
- cumulativeScroll);
-}
-
-blink::WebGestureCurve* FlingCurveConfiguration::CreateForTouchPad(
- const blink::WebFloatPoint& velocity,
- const blink::WebSize& cumulativeScroll) {
- return CreateCore(touchpad_coefs_, velocity, cumulativeScroll);
-}
-
-blink::WebGestureCurve* FlingCurveConfiguration::CreateForTouchScreen(
- const blink::WebFloatPoint& velocity,
- const blink::WebSize& cumulativeScroll) {
- return CreateCore(touchscreen_coefs_, velocity, cumulativeScroll);
-}
-
-} // namespace content
« no previous file with comments | « content/child/fling_curve_configuration.h ('k') | content/child/touch_fling_gesture_curve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698