Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 321563002: Support minimum gesture bounds in GestureProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 jint pointer_count, 937 jint pointer_count,
938 jint history_size, 938 jint history_size,
939 jint action_index, 939 jint action_index,
940 jfloat pos_x_0, 940 jfloat pos_x_0,
941 jfloat pos_y_0, 941 jfloat pos_y_0,
942 jfloat pos_x_1, 942 jfloat pos_x_1,
943 jfloat pos_y_1, 943 jfloat pos_y_1,
944 jint pointer_id_0, 944 jint pointer_id_0,
945 jint pointer_id_1, 945 jint pointer_id_1,
946 jfloat touch_major_0, 946 jfloat touch_major_0,
947 jfloat touch_major_1) { 947 jfloat touch_major_1,
948 jint tool_type) {
948 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); 949 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid();
949 // Avoid synthesizing a touch event if it cannot be forwarded. 950 // Avoid synthesizing a touch event if it cannot be forwarded.
950 if (!rwhv) 951 if (!rwhv)
951 return false; 952 return false;
952 953
953 MotionEventAndroid event(1.f / dpi_scale(), 954 MotionEventAndroid event(1.f / dpi_scale(),
954 env, 955 env,
955 motion_event, 956 motion_event,
956 time_ms, 957 time_ms,
957 android_action, 958 android_action,
958 pointer_count, 959 pointer_count,
959 history_size, 960 history_size,
960 action_index, 961 action_index,
961 pos_x_0, 962 pos_x_0,
962 pos_y_0, 963 pos_y_0,
963 pos_x_1, 964 pos_x_1,
964 pos_y_1, 965 pos_y_1,
965 pointer_id_0, 966 pointer_id_0,
966 pointer_id_1, 967 pointer_id_1,
967 touch_major_0, 968 touch_major_0,
968 touch_major_1); 969 touch_major_1,
970 tool_type);
969 971
970 return rwhv->OnTouchEvent(event); 972 return rwhv->OnTouchEvent(event);
971 } 973 }
972 974
973 float ContentViewCoreImpl::GetDpiScale() const { 975 float ContentViewCoreImpl::GetDpiScale() const {
974 return dpi_scale_; 976 return dpi_scale_;
975 } 977 }
976 978
977 jboolean ContentViewCoreImpl::SendMouseMoveEvent(JNIEnv* env, 979 jboolean ContentViewCoreImpl::SendMouseMoveEvent(JNIEnv* env,
978 jobject obj, 980 jobject obj,
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 reinterpret_cast<ui::WindowAndroid*>(window_android), 1634 reinterpret_cast<ui::WindowAndroid*>(window_android),
1633 retained_objects_set); 1635 retained_objects_set);
1634 return reinterpret_cast<intptr_t>(view); 1636 return reinterpret_cast<intptr_t>(view);
1635 } 1637 }
1636 1638
1637 bool RegisterContentViewCore(JNIEnv* env) { 1639 bool RegisterContentViewCore(JNIEnv* env) {
1638 return RegisterNativesImpl(env); 1640 return RegisterNativesImpl(env);
1639 } 1641 }
1640 1642
1641 } // namespace content 1643 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698