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 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 jfloat x, | 1054 jfloat x, |
1055 jfloat y) { | 1055 jfloat y) { |
1056 WebGestureEvent event = MakeGestureEvent( | 1056 WebGestureEvent event = MakeGestureEvent( |
1057 WebInputEvent::GestureTapCancel, time_ms, x, y); | 1057 WebInputEvent::GestureTapCancel, time_ms, x, y); |
1058 SendGestureEvent(event); | 1058 SendGestureEvent(event); |
1059 } | 1059 } |
1060 | 1060 |
1061 void ContentViewCoreImpl::TapDown(JNIEnv* env, jobject obj, | 1061 void ContentViewCoreImpl::TapDown(JNIEnv* env, jobject obj, |
1062 jlong time_ms, | 1062 jlong time_ms, |
1063 jfloat x, jfloat y) { | 1063 jfloat x, jfloat y) { |
1064 // TODO - once Blink accepts tap down events correctly, fire tap down | 1064 WebGestureEvent event = MakeGestureEvent( |
1065 // here. See crbug.com/302752. | 1065 WebInputEvent::GestureTapDown, time_ms, x, y); |
| 1066 SendGestureEvent(event); |
1066 } | 1067 } |
1067 | 1068 |
1068 void ContentViewCoreImpl::DoubleTap(JNIEnv* env, jobject obj, jlong time_ms, | 1069 void ContentViewCoreImpl::DoubleTap(JNIEnv* env, jobject obj, jlong time_ms, |
1069 jfloat x, jfloat y) { | 1070 jfloat x, jfloat y) { |
1070 WebGestureEvent event = MakeGestureEvent( | 1071 WebGestureEvent event = MakeGestureEvent( |
1071 WebInputEvent::GestureDoubleTap, time_ms, x, y); | 1072 WebInputEvent::GestureDoubleTap, time_ms, x, y); |
1072 SendGestureEvent(event); | 1073 SendGestureEvent(event); |
1073 } | 1074 } |
1074 | 1075 |
1075 void ContentViewCoreImpl::LongPress(JNIEnv* env, jobject obj, jlong time_ms, | 1076 void ContentViewCoreImpl::LongPress(JNIEnv* env, jobject obj, jlong time_ms, |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1630 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1630 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1631 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1631 return reinterpret_cast<jint>(view); | 1632 return reinterpret_cast<jint>(view); |
1632 } | 1633 } |
1633 | 1634 |
1634 bool RegisterContentViewCore(JNIEnv* env) { | 1635 bool RegisterContentViewCore(JNIEnv* env) { |
1635 return RegisterNativesImpl(env); | 1636 return RegisterNativesImpl(env); |
1636 } | 1637 } |
1637 | 1638 |
1638 } // namespace content | 1639 } // namespace content |
OLD | NEW |