Android: WindowAndroid returns mouse wheel scroll factor

Use WindowAndroid context to return a suitable mouse wheel
scroll factor to the renderer asking for mouse wheel minimum
granularity. Moving the logic to WindowAndroid saves
content layer from having to keep the value in RenderCoordinates.

Bug: 626765
Change-Id: I98c057b428aaf10266c72e4be8cce5fd39019e83
Reviewed-on: https://chromium-review.googlesource.com/950426
Reviewed-by: Bo <[email protected]>
Commit-Queue: Jinsuk Kim <[email protected]>
Cr-Commit-Position: refs/heads/master@{#541377}
diff --git a/ui/android/event_forwarder.cc b/ui/android/event_forwarder.cc
index 8085ddb..a1e6541 100644
--- a/ui/android/event_forwarder.cc
+++ b/ui/android/event_forwarder.cc
@@ -128,8 +128,7 @@
                                        jfloat x,
                                        jfloat y,
                                        jfloat ticks_x,
-                                       jfloat ticks_y,
-                                       jfloat pixels_per_tick) {
+                                       jfloat ticks_y) {
   if (!ticks_x && !ticks_y)
     return;
 
@@ -142,6 +141,10 @@
                               delta.InMicroseconds(), 1, 1000000, 50);
   ui::MotionEventAndroid::Pointer pointer(
       0, x, y, 0.0f /* touch_major */, 0.0f /* touch_minor */, 0.0f, 0.0f, 0);
+
+  auto* window = view_->GetWindowAndroid();
+  float pixels_per_tick = window ? window->mouse_wheel_tick_multiplier()
+                                 : kDefaultMouseWheelTickMultiplier;
   ui::MotionEventAndroid event(
       env, nullptr, 1.f / view_->GetDipScale(), ticks_x, ticks_y,
       pixels_per_tick, time_ms, 0 /* action */, 1 /* pointer_count */,