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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 jfloat touch_major_1, | 873 jfloat touch_major_1, |
874 jfloat touch_minor_0, | 874 jfloat touch_minor_0, |
875 jfloat touch_minor_1, | 875 jfloat touch_minor_1, |
876 jfloat orientation_0, | 876 jfloat orientation_0, |
877 jfloat orientation_1, | 877 jfloat orientation_1, |
878 jfloat raw_pos_x, | 878 jfloat raw_pos_x, |
879 jfloat raw_pos_y, | 879 jfloat raw_pos_y, |
880 jint android_tool_type_0, | 880 jint android_tool_type_0, |
881 jint android_tool_type_1, | 881 jint android_tool_type_1, |
882 jint android_button_state, | 882 jint android_button_state, |
| 883 jint android_meta_state, |
883 jboolean is_touch_handle_event) { | 884 jboolean is_touch_handle_event) { |
884 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 885 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
885 // Avoid synthesizing a touch event if it cannot be forwarded. | 886 // Avoid synthesizing a touch event if it cannot be forwarded. |
886 if (!rwhv) | 887 if (!rwhv) |
887 return false; | 888 return false; |
888 | 889 |
889 MotionEventAndroid event(1.f / dpi_scale(), | 890 MotionEventAndroid event(1.f / dpi_scale(), |
890 env, | 891 env, |
891 motion_event, | 892 motion_event, |
892 time_ms, | 893 time_ms, |
(...skipping 10 matching lines...) Expand all Loading... |
903 touch_major_0, | 904 touch_major_0, |
904 touch_major_1, | 905 touch_major_1, |
905 touch_minor_0, | 906 touch_minor_0, |
906 touch_minor_1, | 907 touch_minor_1, |
907 orientation_0, | 908 orientation_0, |
908 orientation_1, | 909 orientation_1, |
909 raw_pos_x, | 910 raw_pos_x, |
910 raw_pos_y, | 911 raw_pos_y, |
911 android_tool_type_0, | 912 android_tool_type_0, |
912 android_tool_type_1, | 913 android_tool_type_1, |
913 android_button_state); | 914 android_button_state, |
| 915 android_meta_state); |
914 | 916 |
915 return is_touch_handle_event ? rwhv->OnTouchHandleEvent(event) | 917 return is_touch_handle_event ? rwhv->OnTouchHandleEvent(event) |
916 : rwhv->OnTouchEvent(event); | 918 : rwhv->OnTouchEvent(event); |
917 } | 919 } |
918 | 920 |
919 float ContentViewCoreImpl::GetDpiScale() const { | 921 float ContentViewCoreImpl::GetDpiScale() const { |
920 return dpi_scale_; | 922 return dpi_scale_; |
921 } | 923 } |
922 | 924 |
923 jboolean ContentViewCoreImpl::SendMouseMoveEvent(JNIEnv* env, | 925 jboolean ContentViewCoreImpl::SendMouseMoveEvent(JNIEnv* env, |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1339 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1338 retained_objects_set); | 1340 retained_objects_set); |
1339 return reinterpret_cast<intptr_t>(view); | 1341 return reinterpret_cast<intptr_t>(view); |
1340 } | 1342 } |
1341 | 1343 |
1342 bool RegisterContentViewCore(JNIEnv* env) { | 1344 bool RegisterContentViewCore(JNIEnv* env) { |
1343 return RegisterNativesImpl(env); | 1345 return RegisterNativesImpl(env); |
1344 } | 1346 } |
1345 | 1347 |
1346 } // namespace content | 1348 } // namespace content |
OLD | NEW |