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

Unified Diff: device/device_sensors/sensor_manager_android.h

Issue 1164563003: Extract device_sensors to /device via Mojofication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « device/device_sensors/inertial_sensor_consts.h ('k') | device/device_sensors/sensor_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/device_sensors/sensor_manager_android.h
diff --git a/content/browser/device_sensors/sensor_manager_android.h b/device/device_sensors/sensor_manager_android.h
similarity index 73%
rename from content/browser/device_sensors/sensor_manager_android.h
rename to device/device_sensors/sensor_manager_android.h
index 535efa1c1c92a6970cebbb26f7877347933bbb17..51e26effe35849c9265094851bcc537c517704f1 100644
--- a/content/browser/device_sensors/sensor_manager_android.h
+++ b/device/device_sensors/sensor_manager_android.h
@@ -2,27 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_
-#define CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_
+#ifndef DEVICE_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_
+#define DEVICE_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_
#include "base/android/scoped_java_ref.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
-#include "content/common/content_export.h"
-#include "content/common/device_sensors/device_light_hardware_buffer.h"
-#include "content/common/device_sensors/device_motion_hardware_buffer.h"
-#include "content/common/device_sensors/device_orientation_hardware_buffer.h"
+#include "device/device_sensors/device_light_hardware_buffer.h"
+#include "device/device_sensors/device_motion_hardware_buffer.h"
+#include "device/device_sensors/device_orientation_hardware_buffer.h"
+#include "device/device_sensors/device_sensors_export.h"
-template<typename T> struct DefaultSingletonTraits;
+template <typename T>
+struct DefaultSingletonTraits;
-namespace content {
+namespace device {
// Android implementation of Device {Motion|Orientation|Light} API.
//
// Android's SensorManager has a push API, so when Got*() methods are called
// by the system the browser process puts the received data into a shared
// memory buffer, which is read by the renderer processes.
-class CONTENT_EXPORT SensorManagerAndroid {
+class DEVICE_SENSORS_EXPORT SensorManagerAndroid {
public:
// Must be called at startup, before GetInstance().
static bool Register(JNIEnv* env);
@@ -32,14 +33,22 @@ class CONTENT_EXPORT SensorManagerAndroid {
// Called from Java via JNI.
void GotLight(JNIEnv*, jobject, double value);
- void GotOrientation(JNIEnv*, jobject,
- double alpha, double beta, double gamma);
- void GotAcceleration(JNIEnv*, jobject,
- double x, double y, double z);
- void GotAccelerationIncludingGravity(JNIEnv*, jobject,
- double x, double y, double z);
- void GotRotationRate(JNIEnv*, jobject,
- double alpha, double beta, double gamma);
+ void GotOrientation(JNIEnv*,
+ jobject,
+ double alpha,
+ double beta,
+ double gamma);
+ void GotAcceleration(JNIEnv*, jobject, double x, double y, double z);
+ void GotAccelerationIncludingGravity(JNIEnv*,
+ jobject,
+ double x,
+ double y,
+ double z);
+ void GotRotationRate(JNIEnv*,
+ jobject,
+ double alpha,
+ double beta,
+ double gamma);
// Shared memory related methods.
bool StartFetchingDeviceLightData(DeviceLightHardwareBuffer* buffer);
@@ -121,6 +130,6 @@ class CONTENT_EXPORT SensorManagerAndroid {
DISALLOW_COPY_AND_ASSIGN(SensorManagerAndroid);
};
-} // namespace content
+} // namespace device
-#endif // CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_
+#endif // DEVICE_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_
« no previous file with comments | « device/device_sensors/inertial_sensor_consts.h ('k') | device/device_sensors/sensor_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698