summaryrefslogtreecommitdiffstats
path: root/content/browser/android/touch_point.h
diff options
context:
space:
mode:
authorqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 22:32:42 +0000
committerqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 22:32:42 +0000
commit00b4ab46499761820cab343ee89651256bf7bdf2 (patch)
tree7dac16137250491567e624301b27ecfe85e9e1fc /content/browser/android/touch_point.h
parent74098a32d68fa71661d31277b9a4b6c01f70e2d8 (diff)
downloadchromium_src-00b4ab46499761820cab343ee89651256bf7bdf2.zip
chromium_src-00b4ab46499761820cab343ee89651256bf7bdf2.tar.gz
chromium_src-00b4ab46499761820cab343ee89651256bf7bdf2.tar.bz2
Adding java TouchPoint class for android
Upstream the java TouchPoint class before we upstream all the touch related stuff for chrome on android. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10532148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/android/touch_point.h')
-rw-r--r--content/browser/android/touch_point.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/content/browser/android/touch_point.h b/content/browser/android/touch_point.h
new file mode 100644
index 0000000..7bbc379
--- /dev/null
+++ b/content/browser/android/touch_point.h
@@ -0,0 +1,27 @@
+// 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_ANDROID_TOUCH_POINT_H_
+#define CONTENT_BROWSER_ANDROID_TOUCH_POINT_H_
+#pragma once
+
+#include <jni.h>
+
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
+
+namespace content {
+
+// This class provides a helper method to convert a java object array of touch
+// events into a WebKit::WebTouchEvent.
+class TouchPoint {
+ public:
+ static void BuildWebTouchEvent(JNIEnv* env, jint type, jlong time_ms,
+ jobjectArray pts, WebKit::WebTouchEvent& event);
+};
+
+bool RegisterTouchPoint(JNIEnv* env);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_CHROME_VIEW_H_