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