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 1e635211427d776cdb627d5a417473676b49af3c..ee538a47042ea9eed3da9543b0eee98f90a88db2 100644 |
--- a/content/browser/android/content_view_core_impl.h |
+++ b/content/browser/android/content_view_core_impl.h |
@@ -14,7 +14,7 @@ |
#include "base/i18n/rtl.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/process/process.h" |
-#include "content/browser/renderer_host/input/touch_disposition_gesture_filter.h" |
+#include "content/browser/renderer_host/input/content_gesture_provider.h" |
#include "content/browser/renderer_host/render_widget_host_view_android.h" |
#include "content/browser/web_contents/web_contents_impl.h" |
#include "content/public/browser/android/content_view_core.h" |
@@ -37,8 +37,8 @@ struct MenuItem; |
// TODO(jrg): this is a shell. Upstream the rest. |
class ContentViewCoreImpl : public ContentViewCore, |
+ public ContentGestureProviderClient, |
public NotificationObserver, |
- public TouchDispositionGestureFilterClient, |
public WebContentsObserver { |
public: |
static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); |
@@ -95,10 +95,9 @@ class ContentViewCoreImpl : public ContentViewCore, |
JNIEnv* env, jobject obj) const; |
jboolean IsIncognito(JNIEnv* env, jobject obj); |
void SendOrientationChangeEvent(JNIEnv* env, jobject obj, jint orientation); |
- void OnTouchEventHandlingBegin(JNIEnv* env, |
- jobject obj, |
- jobject motion_event); |
- void OnTouchEventHandlingEnd(JNIEnv* env, jobject obj); |
+ jboolean OnTouchEvent(JNIEnv* env, |
+ jobject obj, |
+ jobject motion_event); |
jboolean SendMouseMoveEvent(JNIEnv* env, |
jobject obj, |
jlong time_ms, |
@@ -121,22 +120,11 @@ class ContentViewCoreImpl : public ContentViewCore, |
void SingleTap(JNIEnv* env, jobject obj, jlong time_ms, |
jfloat x, jfloat y, |
jboolean disambiguation_popup_tap); |
- void SingleTapUnconfirmed(JNIEnv* env, jobject obj, jlong time_ms, |
- jfloat x, jfloat y); |
- void ShowPress(JNIEnv* env, jobject obj, jlong time_ms, |
- jfloat x, jfloat y); |
- void TapCancel(JNIEnv* env, jobject obj, jlong time_ms, |
- jfloat x, jfloat y); |
- void TapDown(JNIEnv* env, jobject obj, jlong time_ms, |
- jfloat x, jfloat y); |
void DoubleTap(JNIEnv* env, jobject obj, jlong time_ms, |
jfloat x, jfloat y) ; |
void LongPress(JNIEnv* env, jobject obj, jlong time_ms, |
jfloat x, jfloat y, |
jboolean disambiguation_popup_tap); |
- void LongTap(JNIEnv* env, jobject obj, jlong time_ms, |
- jfloat x, jfloat y, |
- jboolean disambiguation_popup_tap); |
void PinchBegin(JNIEnv* env, jobject obj, jlong time_ms, jfloat x, jfloat y); |
void PinchEnd(JNIEnv* env, jobject obj, jlong time_ms); |
void PinchBy(JNIEnv* env, jobject obj, jlong time_ms, |
@@ -146,6 +134,17 @@ class ContentViewCoreImpl : public ContentViewCore, |
jfloat x2, jfloat y2); |
void MoveCaret(JNIEnv* env, jobject obj, jfloat x, jfloat y); |
+ void ResetGestureDetectors(JNIEnv* env, jobject obj); |
+ void IgnoreRemainingTouchEvents(JNIEnv* env, jobject obj); |
+ void OnWindowFocusLost(JNIEnv* env, jobject obj); |
+ void UpdateDoubleTapSupportForPage(JNIEnv* env, |
+ jobject obj, |
+ jboolean has_support); |
+ void UpdateDoubleTapSupport(JNIEnv* env, jobject obj, jboolean has_support); |
+ void UpdateMultiTouchZoomSupport(JNIEnv* env, |
+ jobject obj, |
+ jboolean has_support); |
+ |
void LoadIfNecessary(JNIEnv* env, jobject obj); |
void RequestRestoreLoad(JNIEnv* env, jobject obj); |
void StopLoading(JNIEnv* env, jobject obj); |
@@ -218,12 +217,6 @@ class ContentViewCoreImpl : public ContentViewCore, |
jboolean IsShowingInterstitialPage(JNIEnv* env, jobject obj); |
void SetAccessibilityEnabled(JNIEnv* env, jobject obj, bool enabled); |
- void SendActionAfterDoubleTapUma(JNIEnv* env, |
- jobject obj, |
- jint type, |
- jboolean has_delay, |
- jint count); |
- void SendSingleTapUma(JNIEnv* env, jobject obj, jint type, jint count); |
void ExtractSmartClipData(JNIEnv* env, |
jobject obj, |
@@ -327,9 +320,8 @@ class ContentViewCoreImpl : public ContentViewCore, |
virtual void RenderViewReady() OVERRIDE; |
virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; |
- // TouchDispositionGestureFilterClient implementation. |
- virtual void ForwardGestureEvent( |
- const blink::WebGestureEvent& event) OVERRIDE; |
+ // ContentGestureProviderClient implementation. |
+ virtual void OnGestureEvent(const blink::WebGestureEvent& event) OVERRIDE; |
// -------------------------------------------------------------------------- |
// Other private methods and data |
@@ -352,7 +344,6 @@ class ContentViewCoreImpl : public ContentViewCore, |
void DeleteScaledSnapshotTexture(); |
void SendGestureEvent(const blink::WebGestureEvent& event); |
- void SendSyntheticGestureEvent(const blink::WebGestureEvent& event); |
// Update focus state of the RenderWidgetHostView. |
void SetFocusInternal(bool focused); |
@@ -386,18 +377,16 @@ class ContentViewCoreImpl : public ContentViewCore, |
// The owning window that has a hold of main application activity. |
ui::WindowAndroid* window_android_; |
+ // Provides gesture synthesis given a stream of touch events (derived from |
+ // Android MotionEvent's) and touch event acks. |
+ ContentGestureProvider gesture_provider_; |
+ |
// The cache of device's current orientation set from Java side, this value |
// will be sent to Renderer once it is ready. |
int device_orientation_; |
bool geolocation_needs_pause_; |
- // Handles gesture dispatch as the generating touch events are ack'ed. |
- TouchDispositionGestureFilter touch_disposition_gesture_filter_; |
- bool handling_touch_event_; |
- blink::WebTouchEvent pending_touch_event_; |
- GestureEventPacket pending_gesture_packet_; |
- |
DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
}; |