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

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

Issue 2252423002: Refactoring button field and its type (2nd try) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 4 years, 4 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 <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
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
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
OLDNEW
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | content/browser/devtools/protocol/color_picker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698