| Index: content/browser/device_sensors/sensor_manager_android.cc
|
| diff --git a/content/browser/device_orientation/sensor_manager_android.cc b/content/browser/device_sensors/sensor_manager_android.cc
|
| similarity index 95%
|
| rename from content/browser/device_orientation/sensor_manager_android.cc
|
| rename to content/browser/device_sensors/sensor_manager_android.cc
|
| index cec2c5e6a5eaba9bc30fc4d99fc09ac0b74fde53..400adfa355bccbb1ea607eb52c86ae774994851f 100644
|
| --- a/content/browser/device_orientation/sensor_manager_android.cc
|
| +++ b/content/browser/device_sensors/sensor_manager_android.cc
|
| @@ -2,15 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/browser/device_orientation/sensor_manager_android.h"
|
| +#include "content/browser/device_sensors/sensor_manager_android.h"
|
|
|
| #include <string.h>
|
|
|
| #include "base/android/jni_android.h"
|
| #include "base/memory/singleton.h"
|
| #include "base/metrics/histogram.h"
|
| -#include "content/browser/device_orientation/inertial_sensor_consts.h"
|
| -#include "jni/DeviceMotionAndOrientation_jni.h"
|
| +#include "content/browser/device_sensors/inertial_sensor_consts.h"
|
| +#include "jni/DeviceSensors_jni.h"
|
|
|
| using base::android::AttachCurrentThread;
|
|
|
| @@ -32,7 +32,7 @@ SensorManagerAndroid::SensorManagerAndroid()
|
| is_orientation_buffer_ready_(false) {
|
| memset(received_motion_data_, 0, sizeof(received_motion_data_));
|
| device_orientation_.Reset(
|
| - Java_DeviceMotionAndOrientation_getInstance(
|
| + Java_DeviceSensors_getInstance(
|
| AttachCurrentThread(),
|
| base::android::GetApplicationContext()));
|
| }
|
| @@ -139,7 +139,7 @@ void SensorManagerAndroid::GotRotationRate(
|
|
|
| bool SensorManagerAndroid::Start(EventType event_type) {
|
| DCHECK(!device_orientation_.is_null());
|
| - return Java_DeviceMotionAndOrientation_start(
|
| + return Java_DeviceSensors_start(
|
| AttachCurrentThread(), device_orientation_.obj(),
|
| reinterpret_cast<intptr_t>(this), static_cast<jint>(event_type),
|
| kInertialSensorIntervalMillis);
|
| @@ -147,14 +147,14 @@ bool SensorManagerAndroid::Start(EventType event_type) {
|
|
|
| void SensorManagerAndroid::Stop(EventType event_type) {
|
| DCHECK(!device_orientation_.is_null());
|
| - Java_DeviceMotionAndOrientation_stop(
|
| + Java_DeviceSensors_stop(
|
| AttachCurrentThread(), device_orientation_.obj(),
|
| static_cast<jint>(event_type));
|
| }
|
|
|
| int SensorManagerAndroid::GetNumberActiveDeviceMotionSensors() {
|
| DCHECK(!device_orientation_.is_null());
|
| - return Java_DeviceMotionAndOrientation_getNumberActiveDeviceMotionSensors(
|
| + return Java_DeviceSensors_getNumberActiveDeviceMotionSensors(
|
| AttachCurrentThread(), device_orientation_.obj());
|
| }
|
|
|
|
|