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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 286243004: [Android] Add GestureStateListener hook for all single-tap event acks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No downstream clients, yay Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 case WebInputEvent::GestureScrollEnd: 584 case WebInputEvent::GestureScrollEnd:
585 Java_ContentViewCore_onScrollEndEventAck(env, j_obj.obj()); 585 Java_ContentViewCore_onScrollEndEventAck(env, j_obj.obj());
586 break; 586 break;
587 case WebInputEvent::GesturePinchBegin: 587 case WebInputEvent::GesturePinchBegin:
588 Java_ContentViewCore_onPinchBeginEventAck(env, j_obj.obj()); 588 Java_ContentViewCore_onPinchBeginEventAck(env, j_obj.obj());
589 break; 589 break;
590 case WebInputEvent::GesturePinchEnd: 590 case WebInputEvent::GesturePinchEnd:
591 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj()); 591 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj());
592 break; 592 break;
593 case WebInputEvent::GestureTap: 593 case WebInputEvent::GestureTap:
594 if (ack_result != INPUT_EVENT_ACK_STATE_CONSUMED) { 594 Java_ContentViewCore_onSingleTapEventAck(
595 Java_ContentViewCore_onTapEventNotConsumed( 595 env,
596 env, j_obj.obj(), event.x * dpi_scale(), event.y * dpi_scale()); 596 j_obj.obj(),
597 } 597 ack_result == INPUT_EVENT_ACK_STATE_CONSUMED,
598 event.x * dpi_scale(),
599 event.y * dpi_scale());
598 break; 600 break;
599 case WebInputEvent::GestureDoubleTap: 601 case WebInputEvent::GestureDoubleTap:
600 Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj()); 602 Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj());
601 break; 603 break;
602 default: 604 default:
603 break; 605 break;
604 } 606 }
605 } 607 }
606 608
607 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) { 609 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) {
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 reinterpret_cast<ui::WindowAndroid*>(window_android), 1663 reinterpret_cast<ui::WindowAndroid*>(window_android),
1662 retained_objects_set); 1664 retained_objects_set);
1663 return reinterpret_cast<intptr_t>(view); 1665 return reinterpret_cast<intptr_t>(view);
1664 } 1666 }
1665 1667
1666 bool RegisterContentViewCore(JNIEnv* env) { 1668 bool RegisterContentViewCore(JNIEnv* env) {
1667 return RegisterNativesImpl(env); 1669 return RegisterNativesImpl(env);
1668 } 1670 }
1669 1671
1670 } // namespace content 1672 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698