OLD | NEW |
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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 break; | 608 break; |
609 case WebInputEvent::GestureScrollEnd: | 609 case WebInputEvent::GestureScrollEnd: |
610 Java_ContentViewCore_onScrollEndEventAck(env, j_obj.obj()); | 610 Java_ContentViewCore_onScrollEndEventAck(env, j_obj.obj()); |
611 break; | 611 break; |
612 case WebInputEvent::GesturePinchBegin: | 612 case WebInputEvent::GesturePinchBegin: |
613 Java_ContentViewCore_onPinchBeginEventAck(env, j_obj.obj()); | 613 Java_ContentViewCore_onPinchBeginEventAck(env, j_obj.obj()); |
614 break; | 614 break; |
615 case WebInputEvent::GesturePinchEnd: | 615 case WebInputEvent::GesturePinchEnd: |
616 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj()); | 616 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj()); |
617 break; | 617 break; |
| 618 case WebInputEvent::GestureTap: |
| 619 if (ack_result != INPUT_EVENT_ACK_STATE_CONSUMED) { |
| 620 Java_ContentViewCore_onTapEventNotConsumed( |
| 621 env, j_obj.obj(), event.x * dpi_scale(), event.y * dpi_scale()); |
| 622 } |
| 623 break; |
618 case WebInputEvent::GestureDoubleTap: | 624 case WebInputEvent::GestureDoubleTap: |
619 Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj()); | 625 Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj()); |
620 break; | 626 break; |
621 default: | 627 default: |
622 break; | 628 break; |
623 } | 629 } |
624 } | 630 } |
625 | 631 |
626 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) { | 632 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) { |
627 if (event.type != WebInputEvent::GestureTap && | 633 if (event.type != WebInputEvent::GestureTap && |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1795 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1801 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1796 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1802 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1797 return reinterpret_cast<intptr_t>(view); | 1803 return reinterpret_cast<intptr_t>(view); |
1798 } | 1804 } |
1799 | 1805 |
1800 bool RegisterContentViewCore(JNIEnv* env) { | 1806 bool RegisterContentViewCore(JNIEnv* env) { |
1801 return RegisterNativesImpl(env); | 1807 return RegisterNativesImpl(env); |
1802 } | 1808 } |
1803 | 1809 |
1804 } // namespace content | 1810 } // namespace content |
OLD | NEW |