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

Unified Diff: content/browser/device_orientation/data_fetcher_impl_android.h

Issue 59403004: Android: remove device_data.h from browser/device_orientation/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed extra line Created 6 years, 11 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 | « no previous file | content/browser/device_orientation/data_fetcher_impl_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/device_orientation/data_fetcher_impl_android.h
diff --git a/content/browser/device_orientation/data_fetcher_impl_android.h b/content/browser/device_orientation/data_fetcher_impl_android.h
index 9332fa2e20ad20a7bb10342633afede8697c2b06..8a8a69fd14fea629a351796546ee1880e3de9b1d 100644
--- a/content/browser/device_orientation/data_fetcher_impl_android.h
+++ b/content/browser/device_orientation/data_fetcher_impl_android.h
@@ -8,7 +8,6 @@
#include "base/android/scoped_java_ref.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
-#include "content/browser/device_orientation/device_data.h"
#include "content/common/content_export.h"
#include "content/common/device_orientation/device_motion_hardware_buffer.h"
#include "content/common/device_orientation/device_orientation_hardware_buffer.h"
@@ -43,9 +42,6 @@ class CONTENT_EXPORT DataFetcherImplAndroid {
void GotRotationRate(JNIEnv*, jobject,
double alpha, double beta, double gamma);
- virtual bool Start(DeviceData::Type event_type);
- virtual void Stop(DeviceData::Type event_type);
-
// Shared memory related methods.
bool StartFetchingDeviceMotionData(DeviceMotionHardwareBuffer* buffer);
void StopFetchingDeviceMotionData();
@@ -55,20 +51,24 @@ class CONTENT_EXPORT DataFetcherImplAndroid {
void StopFetchingDeviceOrientationData();
protected:
+ enum EventType {
+ // These constants should match DEVICE_ORIENTATION and DEVICE_MOTION
+ // constants in content/public/android/java/src/org/chromium/content/
+ // browser/DeviceMotionAndOrientation.java
+ kTypeOrientation = 0,
+ kTypeMotion = 1
+ };
+
DataFetcherImplAndroid();
virtual ~DataFetcherImplAndroid();
+ virtual bool Start(EventType event_type);
+ virtual void Stop(EventType event_type);
virtual int GetNumberActiveDeviceMotionSensors();
private:
friend struct DefaultSingletonTraits<DataFetcherImplAndroid>;
- void CheckMotionBufferReadyToRead();
- void SetMotionBufferReadyStatus(bool ready);
- void ClearInternalMotionBuffers();
-
- void SetOrientationBufferReadyStatus(bool ready);
-
enum {
RECEIVED_MOTION_DATA_ACCELERATION = 0,
RECEIVED_MOTION_DATA_ACCELERATION_INCL_GRAVITY = 1,
@@ -76,6 +76,12 @@ class CONTENT_EXPORT DataFetcherImplAndroid {
RECEIVED_MOTION_DATA_MAX = 3,
};
+ void CheckMotionBufferReadyToRead();
+ void SetMotionBufferReadyStatus(bool ready);
+ void ClearInternalMotionBuffers();
+
+ void SetOrientationBufferReadyStatus(bool ready);
+
// The Java provider of orientation info.
base::android::ScopedJavaGlobalRef<jobject> device_orientation_;
int number_active_device_motion_sensors_;
« no previous file with comments | « no previous file | content/browser/device_orientation/data_fetcher_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698