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

Side by Side Diff: content/browser/renderer_host/touch_smooth_scroll_gesture_android.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: nits Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TOUCH_SMOOTH_GESTURE_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_TOUCH_SMOOTH_GESTURE_ANDROID_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/time.h"
10 #include "content/browser/renderer_host/smooth_scroll_calculator.h"
11 #include "content/port/browser/smooth_scroll_gesture.h"
12
13 namespace content {
14
15 class ContentViewCore;
16 class RenderWidgetHost;
17
18 class TouchSmoothScrollGestureAndroid : public SmoothScrollGesture {
19 public:
20 TouchSmoothScrollGestureAndroid(
21 int pixels_to_scroll,
22 RenderWidgetHost* rwh,
23 base::android::ScopedJavaLocalRef<jobject> java_scroller);
24
25 // Called by the java side once the TimeAnimator ticks.
26 double GetScrollDelta(JNIEnv* env, jobject obj, double scale);
27 bool HasFinished(JNIEnv* env, jobject obj);
28 void SetHasSentMotionUp(JNIEnv* env, jobject obj);
29
30 // SmoothScrollGesture
31 virtual bool ForwardInputEvents(base::TimeTicks now,
32 RenderWidgetHost* host) OVERRIDE;
33
34 private:
35 virtual ~TouchSmoothScrollGestureAndroid();
36
37 SmoothScrollCalculator smooth_scroll_calculator_;
38
39 int pixels_scrolled_;
40 bool has_started_;
41 bool has_sent_motion_up_;
42
43 int pixels_to_scroll_;
44 RenderWidgetHost* rwh_;
45 base::android::ScopedJavaGlobalRef<jobject> java_scroller_;
46
47 DISALLOW_COPY_AND_ASSIGN(TouchSmoothScrollGestureAndroid);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_RENDERER_HOST_TOUCH_SMOOTH_GESTURE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698