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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java

Issue 59673007: Android: moves content/ to use long for JNI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java b/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java
index 937ad8932feb3349461d5877e6121d558d31922a..2d511235335da557300cd8f73d18f91adf3d4a78 100644
--- a/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java
+++ b/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java
@@ -41,7 +41,7 @@ class DeviceMotionAndOrientation implements SensorEventListener {
// Non-zero if and only if we're listening for events.
// To avoid race conditions on the C++ side, access must be synchronized.
- private int mNativePtr;
+ private long mNativePtr;
// The lock to access the mNativePtr.
private final Object mNativePtrLock = new Object();
@@ -88,7 +88,7 @@ class DeviceMotionAndOrientation implements SensorEventListener {
* @return True on success.
*/
@CalledByNative
- public boolean start(int nativePtr, int eventType, int rateInMilliseconds) {
+ public boolean start(long nativePtr, int eventType, int rateInMilliseconds) {
boolean success = false;
synchronized (mNativePtrLock) {
switch (eventType) {
@@ -431,28 +431,28 @@ class DeviceMotionAndOrientation implements SensorEventListener {
* Orientation of the device with respect to its reference frame.
*/
private native void nativeGotOrientation(
- int nativeDataFetcherImplAndroid,
+ long nativeDataFetcherImplAndroid,
double alpha, double beta, double gamma);
/**
* Linear acceleration without gravity of the device with respect to its body frame.
*/
private native void nativeGotAcceleration(
- int nativeDataFetcherImplAndroid,
+ long nativeDataFetcherImplAndroid,
double x, double y, double z);
/**
* Acceleration including gravity of the device with respect to its body frame.
*/
private native void nativeGotAccelerationIncludingGravity(
- int nativeDataFetcherImplAndroid,
+ long nativeDataFetcherImplAndroid,
double x, double y, double z);
/**
* Rotation rate of the device with respect to its body frame.
*/
private native void nativeGotRotationRate(
- int nativeDataFetcherImplAndroid,
+ long nativeDataFetcherImplAndroid,
double alpha, double beta, double gamma);
/**
@@ -490,4 +490,4 @@ class DeviceMotionAndOrientation implements SensorEventListener {
}
}
-}
+}

Powered by Google App Engine
This is Rietveld 408576698