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

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: 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..0911c3388b3f4888ce4671916f2d21a22de645ac 100644
--- a/content/browser/device_orientation/data_fetcher_impl_android.h
+++ b/content/browser/device_orientation/data_fetcher_impl_android.h
@@ -38,6 +38,15 @@ class DataFetcherImplAndroid : public DataFetcher {
void GotOrientation(JNIEnv*, jobject,
double alpha, double beta, double gamma);
+ void GotAcceleration(JNIEnv*, jobject,
Peter Beverloo 2013/03/11 17:57:25 For clarity, I'd prefer to either remove the empty
timvolodine1 2013/03/12 11:18:06 Done.
+ double x, double y, double z);
Peter Beverloo 2013/03/11 17:57:25 nit: indent should be equal to JNIEnv* on line 41.
timvolodine1 2013/03/12 11:18:06 Done.
+
+ void GotAccelerationIncludingGravity(JNIEnv*, jobject,
+ double x, double y, double z);
Peter Beverloo 2013/03/11 17:57:25 nit: indent should be equal to JNIEnv* on line 45.
timvolodine1 2013/03/12 11:18:06 Done.
+
+ void GotRotationRate(JNIEnv*, jobject,
+ double alpha, double beta, double gamma);
Peter Beverloo 2013/03/11 17:57:25 nit: indent should be equal to JNIEnv* on line 47.
timvolodine1 2013/03/12 11:18:06 Done.
+
// Implementation of DataFetcher.
virtual const DeviceData* GetDeviceData(DeviceData::Type type) OVERRIDE;
@@ -47,7 +56,10 @@ class DataFetcherImplAndroid : public DataFetcher {
// Wrappers for JNI methods.
bool Start(int rate_in_milliseconds);
+ bool Start(int spec_event_type, int rate_in_milliseconds);
Peter Beverloo 2013/03/11 17:57:25 I'm not fond of having an int as the parameter, it
Peter Beverloo 2013/03/11 17:57:25 naming nit: I don't like "spec_event_type", as the
Miguel Garcia 2013/03/11 18:25:50 Yeah let's with an enum on C++ on Java we should k
timvolodine1 2013/03/12 11:18:06 Done.
timvolodine1 2013/03/12 11:18:06 Done.
timvolodine1 2013/03/12 11:18:06 Done.
+
void Stop();
Miguel Garcia 2013/03/11 18:25:50 I am not too fond on method overrides, but if deem
timvolodine1 2013/03/12 11:18:06 Done.
+ void Stop(int spec_event_type);
// Value returned by GetDeviceData.
scoped_refptr<Orientation> current_orientation_;

Powered by Google App Engine
This is Rietveld 408576698