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

Unified Diff: content/browser/device_sensors/sensor_manager_android.cc

Issue 1489453003: jni: Pass method parameters as JavaParamRef in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/browser/device_sensors/sensor_manager_android.cc
diff --git a/content/browser/device_sensors/sensor_manager_android.cc b/content/browser/device_sensors/sensor_manager_android.cc
index 7c9f7c0bb99623a81237aff86534282761e6fcb7..e821fb445a42b30e5c07d209750872de9035dbb8 100644
--- a/content/browser/device_sensors/sensor_manager_android.cc
+++ b/content/browser/device_sensors/sensor_manager_android.cc
@@ -76,8 +76,11 @@ SensorManagerAndroid* SensorManagerAndroid::GetInstance() {
base::LeakySingletonTraits<SensorManagerAndroid>>::get();
}
-void SensorManagerAndroid::GotOrientation(
- JNIEnv*, jobject, double alpha, double beta, double gamma) {
+void SensorManagerAndroid::GotOrientation(JNIEnv*,
+ const JavaParamRef<jobject>&,
+ double alpha,
+ double beta,
+ double gamma) {
base::AutoLock autolock(orientation_buffer_lock_);
if (!device_orientation_buffer_)
@@ -95,8 +98,11 @@ void SensorManagerAndroid::GotOrientation(
}
}
-void SensorManagerAndroid::GotOrientationAbsolute(
- JNIEnv*, jobject, double alpha, double beta, double gamma) {
+void SensorManagerAndroid::GotOrientationAbsolute(JNIEnv*,
+ const JavaParamRef<jobject>&,
+ double alpha,
+ double beta,
+ double gamma) {
base::AutoLock autolock(orientation_absolute_buffer_lock_);
if (!device_orientation_absolute_buffer_)
@@ -111,9 +117,11 @@ void SensorManagerAndroid::GotOrientationAbsolute(
}
}
-
-void SensorManagerAndroid::GotAcceleration(
- JNIEnv*, jobject, double x, double y, double z) {
+void SensorManagerAndroid::GotAcceleration(JNIEnv*,
+ const JavaParamRef<jobject>&,
+ double x,
+ double y,
+ double z) {
base::AutoLock autolock(motion_buffer_lock_);
if (!device_motion_buffer_)
@@ -135,7 +143,11 @@ void SensorManagerAndroid::GotAcceleration(
}
void SensorManagerAndroid::GotAccelerationIncludingGravity(
- JNIEnv*, jobject, double x, double y, double z) {
+ JNIEnv*,
+ const JavaParamRef<jobject>&,
+ double x,
+ double y,
+ double z) {
base::AutoLock autolock(motion_buffer_lock_);
if (!device_motion_buffer_)
@@ -156,8 +168,11 @@ void SensorManagerAndroid::GotAccelerationIncludingGravity(
}
}
-void SensorManagerAndroid::GotRotationRate(
- JNIEnv*, jobject, double alpha, double beta, double gamma) {
+void SensorManagerAndroid::GotRotationRate(JNIEnv*,
+ const JavaParamRef<jobject>&,
+ double alpha,
+ double beta,
+ double gamma) {
base::AutoLock autolock(motion_buffer_lock_);
if (!device_motion_buffer_)
@@ -178,7 +193,9 @@ void SensorManagerAndroid::GotRotationRate(
}
}
-void SensorManagerAndroid::GotLight(JNIEnv*, jobject, double value) {
+void SensorManagerAndroid::GotLight(JNIEnv*,
+ const JavaParamRef<jobject>&,
+ double value) {
base::AutoLock autolock(light_buffer_lock_);
if (!device_light_buffer_)

Powered by Google App Engine
This is Rietveld 408576698