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

Unified Diff: content/browser/renderer_host/smooth_scroll_calculator.h

Issue 11793003: Relands: Telemetry: hooks "chrome.gpuBenchmarking.smoothScrollBy" with java on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moves functionality out of content/port Created 7 years, 8 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
Index: content/browser/renderer_host/smooth_scroll_calculator.h
diff --git a/content/browser/renderer_host/smooth_scroll_calculator.h b/content/browser/renderer_host/smooth_scroll_calculator.h
new file mode 100644
index 0000000000000000000000000000000000000000..029ed13e46df899833be3c8c75396642e3deced3
--- /dev/null
+++ b/content/browser/renderer_host/smooth_scroll_calculator.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2013 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 CONTENT_BROWSER_SMOOTH_SCROLL_CALCULATOR_H_
sadrul 2013/05/08 14:54:35 +RENDERER_HOST_
bulach 2013/05/08 15:19:25 Done.
+#define CONTENT_BROWSER_SMOOTH_SCROLL_CALCULATOR_H_
+
+#include "base/time.h"
+
+namespace content {
+
+// An utility class to calculate the delta for smooth scroll gesture
+// events.
+class SmoothScrollCalculator {
+ public:
+ SmoothScrollCalculator();
+ ~SmoothScrollCalculator();
+
+ double GetScrollDelta(base::TimeTicks now, base::TimeDelta desired_interval);
+
+ private:
+ base::TimeTicks last_tick_time_;
+
+ DISALLOW_COPY_AND_ASSIGN(SmoothScrollCalculator);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_SMOOTH_SCROLL_CALCULATOR_H_

Powered by Google App Engine
This is Rietveld 408576698