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

Unified Diff: ui/events/gestures/velocity_calculator.h

Issue 458363002: Remove old Aura Gesture Detection Pipeline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sadrul's comment, and rebase. Created 6 years, 4 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 | « ui/events/gestures/unified_gesture_detector_enabled.cc ('k') | ui/events/gestures/velocity_calculator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/velocity_calculator.h
diff --git a/ui/events/gestures/velocity_calculator.h b/ui/events/gestures/velocity_calculator.h
deleted file mode 100644
index 3678514f271bda695e4a1dc86c61891c9ba83c29..0000000000000000000000000000000000000000
--- a/ui/events/gestures/velocity_calculator.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef UI_EVENTS_GESTURES_VELOCITY_CALCULATOR_H_
-#define UI_EVENTS_GESTURES_VELOCITY_CALCULATOR_H_
-
-#include <vector>
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/events/events_export.h"
-
-namespace ui {
-
-class EVENTS_EXPORT VelocityCalculator {
- public:
- explicit VelocityCalculator(int bufferSize);
- ~VelocityCalculator();
- void PointSeen(float x, float y, int64 time);
- float XVelocity();
- float YVelocity();
- float VelocitySquared();
- void ClearHistory();
-
- private:
- struct Point {
- float x;
- float y;
- int64 time;
- };
-
- void UpdateVelocity();
-
- typedef scoped_ptr<Point[]> HistoryBuffer;
- HistoryBuffer buffer_;
-
- // index_ points directly after the last point added.
- int index_;
- size_t num_valid_entries_;
- const size_t buffer_size_;
- float x_velocity_;
- float y_velocity_;
- bool velocities_stale_;
- DISALLOW_COPY_AND_ASSIGN(VelocityCalculator);
-};
-
-} // namespace ui
-
-#endif // UI_EVENTS_GESTURES_VELOCITY_CALCULATOR_H_
« no previous file with comments | « ui/events/gestures/unified_gesture_detector_enabled.cc ('k') | ui/events/gestures/velocity_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698