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

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

Issue 502993004: Remove abstract Clone and Cancel methods from MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Owner for BUILD.gn Created 6 years, 2 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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 jint android_tool_type_0, 859 jint android_tool_type_0,
860 jint android_tool_type_1, 860 jint android_tool_type_1,
861 jint android_button_state, 861 jint android_button_state,
862 jint android_meta_state, 862 jint android_meta_state,
863 jboolean is_touch_handle_event) { 863 jboolean is_touch_handle_event) {
864 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); 864 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid();
865 // Avoid synthesizing a touch event if it cannot be forwarded. 865 // Avoid synthesizing a touch event if it cannot be forwarded.
866 if (!rwhv) 866 if (!rwhv)
867 return false; 867 return false;
868 868
869 MotionEventAndroid::Pointer pointer0(pointer_id_0,
870 pos_x_0,
871 pos_y_0,
872 touch_major_0,
873 touch_minor_0,
874 orientation_0,
875 android_tool_type_0);
876 MotionEventAndroid::Pointer pointer1(pointer_id_1,
877 pos_x_1,
878 pos_y_1,
879 touch_major_1,
880 touch_minor_1,
881 orientation_1,
882 android_tool_type_1);
869 MotionEventAndroid event(1.f / dpi_scale(), 883 MotionEventAndroid event(1.f / dpi_scale(),
870 env, 884 env,
871 motion_event, 885 motion_event,
872 time_ms, 886 time_ms,
873 android_action, 887 android_action,
874 pointer_count, 888 pointer_count,
875 history_size, 889 history_size,
876 action_index, 890 action_index,
877 pos_x_0, 891 raw_pos_x - pos_x_0,
878 pos_y_0, 892 raw_pos_y - pos_y_0,
879 pos_x_1,
880 pos_y_1,
881 pointer_id_0,
882 pointer_id_1,
883 touch_major_0,
884 touch_major_1,
885 touch_minor_0,
886 touch_minor_1,
887 orientation_0,
888 orientation_1,
889 raw_pos_x,
890 raw_pos_y,
891 android_tool_type_0,
892 android_tool_type_1,
893 android_button_state, 893 android_button_state,
894 android_meta_state); 894 android_meta_state,
895 pointer0,
896 pointer1);
895 897
896 return is_touch_handle_event ? rwhv->OnTouchHandleEvent(event) 898 return is_touch_handle_event ? rwhv->OnTouchHandleEvent(event)
897 : rwhv->OnTouchEvent(event); 899 : rwhv->OnTouchEvent(event);
898 } 900 }
899 901
900 float ContentViewCoreImpl::GetDpiScale() const { 902 float ContentViewCoreImpl::GetDpiScale() const {
901 return dpi_scale_; 903 return dpi_scale_;
902 } 904 }
903 905
904 jboolean ContentViewCoreImpl::SendMouseMoveEvent(JNIEnv* env, 906 jboolean ContentViewCoreImpl::SendMouseMoveEvent(JNIEnv* env,
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 reinterpret_cast<ui::WindowAndroid*>(window_android), 1320 reinterpret_cast<ui::WindowAndroid*>(window_android),
1319 retained_objects_set); 1321 retained_objects_set);
1320 return reinterpret_cast<intptr_t>(view); 1322 return reinterpret_cast<intptr_t>(view);
1321 } 1323 }
1322 1324
1323 bool RegisterContentViewCore(JNIEnv* env) { 1325 bool RegisterContentViewCore(JNIEnv* env) {
1324 return RegisterNativesImpl(env); 1326 return RegisterNativesImpl(env);
1325 } 1327 }
1326 1328
1327 } // namespace content 1329 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/motion_event_android.h » ('j') | ui/events/test/motion_event_test_utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698