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

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

Issue 11415227: Telemtry: hooks "chrome.gpuBenchmarking.smoothScrollBy" with java on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove inline virtual dtor Created 8 years 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_gesture_android.h
diff --git a/content/browser/renderer_host/smooth_scroll_gesture_android.h b/content/browser/renderer_host/smooth_scroll_gesture_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..69b606da3893c8c5d729dec3cc5cfa0acdbf862b
--- /dev/null
+++ b/content/browser/renderer_host/smooth_scroll_gesture_android.h
@@ -0,0 +1,47 @@
+// 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 CONTENT_BROWSER_RENDERER_HOST_SMOOTH_GESTURE_ANDROID_H_
+#define CONTENT_BROWSER_RENDERER_HOST_SMOOTH_GESTURE_ANDROID_H_
+
+#include "base/android/jni_android.h"
+#include "base/time.h"
+#include "content/port/browser/smooth_scroll_gesture.h"
+
+namespace content {
+
+class ContentViewCore;
+class RenderWidgetHost;
+
+class SmoothScrollGestureAndroid : public SmoothScrollGesture {
+ public:
+ SmoothScrollGestureAndroid(
+ int pixels_to_scroll,
+ RenderWidgetHost* rwh,
+ base::android::ScopedJavaLocalRef<jobject> java_scroller);
+
+ // Called by the java side once the TimeAnimator ticks.
+ double Tick(JNIEnv* env, jobject obj);
+ bool HasFinished(JNIEnv* env, jobject obj);
+
+ // SmoothScrollGesture
+ virtual bool ForwardInputEvents(base::TimeTicks now,
+ RenderWidgetHost* host) OVERRIDE;
+
+ private:
+ virtual ~SmoothScrollGestureAndroid();
+
+ int pixels_scrolled_;
+ bool has_started_;
+
+ int pixels_to_scroll_;
+ RenderWidgetHost* rwh_;
+ base::android::ScopedJavaGlobalRef<jobject> java_scroller_;
+
+ DISALLOW_COPY_AND_ASSIGN(SmoothScrollGestureAndroid);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_SMOOTH_GESTURE_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698