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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |