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

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

Issue 12771008: Implement java-side browser sensor polling for device motion and device orientation DOM events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: taking into account the comments Created 7 years, 9 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_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 cbcb363bfaac37cc17de14efc57d1aa83347936a..6e4fb1bc82f7739d7bd7631a242b44b6835bd863 100644
--- a/content/browser/device_orientation/data_fetcher_impl_android.h
+++ b/content/browser/device_orientation/data_fetcher_impl_android.h
@@ -37,6 +37,12 @@ class DataFetcherImplAndroid : public DataFetcher {
// Called from Java via JNI.
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);
// Implementation of DataFetcher.
virtual const DeviceData* GetDeviceData(DeviceData::Type type) OVERRIDE;
@@ -46,8 +52,11 @@ class DataFetcherImplAndroid : public DataFetcher {
const Orientation* GetOrientation();
// Wrappers for JNI methods.
- bool Start(int rate_in_milliseconds);
- void Stop();
+// bool Start(int rate_in_milliseconds);
Peter Beverloo 2013/03/12 11:26:39 Please don't include commented out code.
timvolodine 2013/03/12 16:12:46 Done.
+ bool Start(DeviceData::Type event_type, int rate_in_milliseconds);
Peter Beverloo 2013/03/12 11:26:39 While device data definitely is not the correct pl
timvolodine 2013/03/12 16:12:46 Done.
+
+// void Stop();
Peter Beverloo 2013/03/12 11:26:39 Dito.
timvolodine 2013/03/12 16:12:46 Done.
+ void Stop(DeviceData::Type event_type);
// Value returned by GetDeviceData.
scoped_refptr<Orientation> current_orientation_;

Powered by Google App Engine
This is Rietveld 408576698