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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/MotionEventUtil.java

Issue 755403006: Added experimental Touch.tilt, Touch.tiltDirection support for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused code (event_sender.cc) Created 5 years, 9 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
« no previous file with comments | « content/content_jni.gypi ('k') | content/renderer/pepper/event_conversion.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.content.browser;
6
7 import android.view.InputDevice;
8 import android.view.MotionEvent;
9
10 import org.chromium.base.CalledByNative;
11 import org.chromium.base.JNINamespace;
12
13 /**
14 * TODO
15 */
16 @JNINamespace("JNI_MotionEventUtil")
17 final class MotionEventUtil {
18 /**
19 */
20 @CalledByNative
21 public static float getAxisValueOrNaN(MotionEvent event, int axis, int point erIndex) {
22 InputDevice device = event.getDevice();
23 InputDevice.MotionRange range = device.getMotionRange(axis);
24 if (range == null || range.getRange() == 0.0)
25 return Float.NaN;
26 return event.getAxisValue(axis, pointerIndex);
27 }
28 }
OLDNEW
« no previous file with comments | « content/content_jni.gypi ('k') | content/renderer/pepper/event_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698