| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 jlong time_ms, | 980 jlong time_ms, |
| 981 jfloat x, | 981 jfloat x, |
| 982 jfloat y, | 982 jfloat y, |
| 983 jint tool_type) { | 983 jint tool_type) { |
| 984 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 984 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| 985 if (!rwhv) | 985 if (!rwhv) |
| 986 return false; | 986 return false; |
| 987 | 987 |
| 988 blink::WebMouseEvent event = WebMouseEventBuilder::Build( | 988 blink::WebMouseEvent event = WebMouseEventBuilder::Build( |
| 989 WebInputEvent::MouseMove, | 989 WebInputEvent::MouseMove, |
| 990 blink::WebMouseEvent::ButtonNone, | 990 blink::WebMouseEvent::Button::NoButton, |
| 991 time_ms / 1000.0, x / dpi_scale(), y / dpi_scale(), 0, 1, | 991 time_ms / 1000.0, x / dpi_scale(), y / dpi_scale(), 0, 1, |
| 992 ui::ToWebPointerType(static_cast<ui::MotionEvent::ToolType>(tool_type))); | 992 ui::ToWebPointerType(static_cast<ui::MotionEvent::ToolType>(tool_type))); |
| 993 | 993 |
| 994 rwhv->SendMouseEvent(event); | 994 rwhv->SendMouseEvent(event); |
| 995 return true; | 995 return true; |
| 996 } | 996 } |
| 997 | 997 |
| 998 jboolean ContentViewCoreImpl::SendMouseWheelEvent( | 998 jboolean ContentViewCoreImpl::SendMouseWheelEvent( |
| 999 JNIEnv* env, | 999 JNIEnv* env, |
| 1000 const JavaParamRef<jobject>& obj, | 1000 const JavaParamRef<jobject>& obj, |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 return ScopedJavaLocalRef<jobject>(); | 1602 return ScopedJavaLocalRef<jobject>(); |
| 1603 | 1603 |
| 1604 return view->GetJavaObject(); | 1604 return view->GetJavaObject(); |
| 1605 } | 1605 } |
| 1606 | 1606 |
| 1607 bool RegisterContentViewCore(JNIEnv* env) { | 1607 bool RegisterContentViewCore(JNIEnv* env) { |
| 1608 return RegisterNativesImpl(env); | 1608 return RegisterNativesImpl(env); |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 } // namespace content | 1611 } // namespace content |
| OLD | NEW |