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