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

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

Issue 236833003: Rename device_orientation to device_sensors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 8 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 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_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());
}

Powered by Google App Engine
This is Rietveld 408576698