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

Unified Diff: content/browser/android/content_view_core_impl.h

Issue 10790066: Enable gesture events handling on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/android/content_view_core_impl.h
diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h
index 3e04591a08e8dd8d3bd9faa9d290f7da13f5ca53..a285a265e00b0bd4046677afe449a93f29dbb3f2 100644
--- a/content/browser/android/content_view_core_impl.h
+++ b/content/browser/android/content_view_core_impl.h
@@ -13,10 +13,12 @@
#include "base/i18n/rtl.h"
#include "base/memory/scoped_ptr.h"
#include "base/process.h"
+#include "content/browser/renderer_host/render_widget_host_view_android.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/notification_observer.h"
#include "googleurl/src/gurl.h"
#include "ui/gfx/rect.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
struct WebMenuItem;
@@ -56,6 +58,31 @@ class ContentViewCoreImpl : public ContentViewCore,
JNIEnv* env, jobject obj) const;
jboolean IsIncognito(JNIEnv* env, jobject obj);
jboolean Crashed(JNIEnv* env, jobject obj) const { return tab_crashed_; }
+
+ jboolean TouchEvent(JNIEnv* env, jobject obj, jlong time_ms, jint type,
+ jobjectArray pts);
+
+ void ScrollBegin(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y);
+ void ScrollEnd(JNIEnv* env, jobject obj, jlong time_ms);
+ void ScrollBy(JNIEnv* env, jobject obj, jlong time_ms,
+ jint dx, jint dy);
+ void FlingStart(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y, jint vx, jint vy);
+ void FlingCancel(JNIEnv* env, jobject obj, jlong time_ms);
+ void SingleTap(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y, jboolean link_preview_tap);
+ void ShowPressState(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y);
+ void DoubleTap(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y) ;
+ void LongPress(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y, jboolean link_preview_tap);
+ void PinchBegin(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y);
+ void PinchEnd(JNIEnv* env, jobject obj, jlong time_ms);
+ void PinchBy(JNIEnv* env, jobject obj, jlong time_ms,
+ jint x, jint y, jfloat delta);
jboolean CanGoBack(JNIEnv* env, jobject obj);
jboolean CanGoForward(JNIEnv* env, jobject obj);
jboolean CanGoToOffset(JNIEnv* env, jobject obj, jint offset);
@@ -85,6 +112,8 @@ class ContentViewCoreImpl : public ContentViewCore,
void SetTitle(const string16& title);
bool HasFocus();
+ void ConfirmTouchEvent(bool handled) OVERRIDE;
+ void DidSetNeedTouchEvents(bool need_touch_events) OVERRIDE;
void OnSelectionChanged(const std::string& text);
void OnSelectionBoundsChanged(int startx,
int starty,
@@ -131,6 +160,12 @@ class ContentViewCoreImpl : public ContentViewCore,
void InitJNI(JNIEnv* env, jobject obj);
+ RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid();
+
+ void SendGestureEvent(WebKit::WebInputEvent::Type type, long time_ms,
+ int x, int y,
+ float dx, float dy, bool link_preview_tap);
+
void PostLoadUrl(const GURL& url);
struct JavaObject;

Powered by Google App Engine
This is Rietveld 408576698