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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 break; | 592 break; |
593 case WebInputEvent::GestureScrollEnd: | 593 case WebInputEvent::GestureScrollEnd: |
594 Java_ContentViewCore_onScrollEndEventAck(env, j_obj.obj()); | 594 Java_ContentViewCore_onScrollEndEventAck(env, j_obj.obj()); |
595 break; | 595 break; |
596 case WebInputEvent::GesturePinchBegin: | 596 case WebInputEvent::GesturePinchBegin: |
597 Java_ContentViewCore_onPinchBeginEventAck(env, j_obj.obj()); | 597 Java_ContentViewCore_onPinchBeginEventAck(env, j_obj.obj()); |
598 break; | 598 break; |
599 case WebInputEvent::GesturePinchEnd: | 599 case WebInputEvent::GesturePinchEnd: |
600 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj()); | 600 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj()); |
601 break; | 601 break; |
| 602 case WebInputEvent::GestureTap: |
| 603 if (ack_result != INPUT_EVENT_ACK_STATE_CONSUMED) { |
| 604 Java_ContentViewCore_onTapEventNotConsumed( |
| 605 env, j_obj.obj(), event.x * dpi_scale(), event.y * dpi_scale()); |
| 606 } |
| 607 break; |
602 case WebInputEvent::GestureDoubleTap: | 608 case WebInputEvent::GestureDoubleTap: |
603 Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj()); | 609 Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj()); |
604 break; | 610 break; |
605 default: | 611 default: |
606 break; | 612 break; |
607 } | 613 } |
608 } | 614 } |
609 | 615 |
610 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) { | 616 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) { |
611 if (event.type != WebInputEvent::GestureTap && | 617 if (event.type != WebInputEvent::GestureTap && |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1750 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1745 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1751 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1746 return reinterpret_cast<intptr_t>(view); | 1752 return reinterpret_cast<intptr_t>(view); |
1747 } | 1753 } |
1748 | 1754 |
1749 bool RegisterContentViewCore(JNIEnv* env) { | 1755 bool RegisterContentViewCore(JNIEnv* env) { |
1750 return RegisterNativesImpl(env); | 1756 return RegisterNativesImpl(env); |
1751 } | 1757 } |
1752 | 1758 |
1753 } // namespace content | 1759 } // namespace content |
OLD | NEW |