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

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

Issue 1113143002: Restore simple fling status bookkeeping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index e87fd3d51f9a87b1643cf46fe43fc777eaa9e092..6896939a61291fdf79f510b0dec4e116adeb3dd8 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -552,42 +552,27 @@ void ContentViewCoreImpl::OnGestureEventAck(const blink::WebGestureEvent& event,
}
}
-InputEventAckState ContentViewCoreImpl::FilterInputEvent(
- const blink::WebInputEvent& event) {
+bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) {
if (event.type != WebInputEvent::GestureTap &&
event.type != WebInputEvent::GestureDoubleTap &&
event.type != WebInputEvent::GestureLongTap &&
- event.type != WebInputEvent::GestureLongPress &&
- event.type != WebInputEvent::GestureFlingCancel) {
- return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
- }
+ event.type != WebInputEvent::GestureLongPress)
+ return false;
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);
if (j_obj.is_null())
- return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
-
- if (event.type == WebInputEvent::GestureFlingCancel) {
- // If no fling is active, either in the compositor or externally-driven,
- // there's no need to explicitly cancel the fling.
- bool may_need_fling_cancel =
- Java_ContentViewCore_isScrollInProgress(env, j_obj.obj());
- return may_need_fling_cancel ? INPUT_EVENT_ACK_STATE_NOT_CONSUMED
- : INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
- }
+ return false;
const blink::WebGestureEvent& gesture =
static_cast<const blink::WebGestureEvent&>(event);
int gesture_type = ToGestureEventType(event.type);
- if (Java_ContentViewCore_filterTapOrPressEvent(env,
- j_obj.obj(),
- gesture_type,
- gesture.x * dpi_scale(),
- gesture.y * dpi_scale())) {
- return INPUT_EVENT_ACK_STATE_CONSUMED;
- }
+ return Java_ContentViewCore_filterTapOrPressEvent(env,
+ j_obj.obj(),
+ gesture_type,
+ gesture.x * dpi_scale(),
+ gesture.y * dpi_scale());
- return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
// TODO(jdduke): Also report double-tap UMA, crbug/347568.
}
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/input/gesture_event_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698