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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 jlong time_ms, | 1005 jlong time_ms, |
1006 jfloat x, | 1006 jfloat x, |
1007 jfloat y, | 1007 jfloat y, |
1008 jint tool_type) { | 1008 jint tool_type) { |
1009 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 1009 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
1010 if (!rwhv) | 1010 if (!rwhv) |
1011 return false; | 1011 return false; |
1012 | 1012 |
1013 blink::WebMouseEvent event = WebMouseEventBuilder::Build( | 1013 blink::WebMouseEvent event = WebMouseEventBuilder::Build( |
1014 WebInputEvent::MouseMove, | 1014 WebInputEvent::MouseMove, |
1015 blink::WebMouseEvent::ButtonNone, | 1015 blink::WebMouseEvent::Button::NoButton, |
1016 time_ms / 1000.0, x / dpi_scale(), y / dpi_scale(), 0, 1, | 1016 time_ms / 1000.0, x / dpi_scale(), y / dpi_scale(), 0, 1, |
1017 ui::ToWebPointerType(static_cast<ui::MotionEvent::ToolType>(tool_type))); | 1017 ui::ToWebPointerType(static_cast<ui::MotionEvent::ToolType>(tool_type))); |
1018 | 1018 |
1019 rwhv->SendMouseEvent(event); | 1019 rwhv->SendMouseEvent(event); |
1020 return true; | 1020 return true; |
1021 } | 1021 } |
1022 | 1022 |
1023 jboolean ContentViewCoreImpl::SendMouseWheelEvent( | 1023 jboolean ContentViewCoreImpl::SendMouseWheelEvent( |
1024 JNIEnv* env, | 1024 JNIEnv* env, |
1025 const JavaParamRef<jobject>& obj, | 1025 const JavaParamRef<jobject>& obj, |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 return ScopedJavaLocalRef<jobject>(); | 1638 return ScopedJavaLocalRef<jobject>(); |
1639 | 1639 |
1640 return view->GetJavaObject(); | 1640 return view->GetJavaObject(); |
1641 } | 1641 } |
1642 | 1642 |
1643 bool RegisterContentViewCore(JNIEnv* env) { | 1643 bool RegisterContentViewCore(JNIEnv* env) { |
1644 return RegisterNativesImpl(env); | 1644 return RegisterNativesImpl(env); |
1645 } | 1645 } |
1646 | 1646 |
1647 } // namespace content | 1647 } // namespace content |
OLD | NEW |