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

Side by Side Diff: device/generic_sensor/platform_sensor_android.h

Issue 2726093003: [sensors][android] Add support for AbsoluteOrientation sensor (Closed)
Patch Set: Rebased to master, rename enum Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_
6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_ 6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_
7 7
8 #include "device/generic_sensor/platform_sensor.h" 8 #include "device/generic_sensor/platform_sensor.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 16 matching lines...) Expand all
27 27
28 void NotifyPlatformSensorError(JNIEnv*, 28 void NotifyPlatformSensorError(JNIEnv*,
29 const base::android::JavaRef<jobject>& caller); 29 const base::android::JavaRef<jobject>& caller);
30 30
31 void UpdatePlatformSensorReading( 31 void UpdatePlatformSensorReading(
32 JNIEnv*, 32 JNIEnv*,
33 const base::android::JavaRef<jobject>& caller, 33 const base::android::JavaRef<jobject>& caller,
34 jdouble timestamp, 34 jdouble timestamp,
35 jdouble value1, 35 jdouble value1,
36 jdouble value2, 36 jdouble value2,
37 jdouble value3); 37 jdouble value3,
38 jdouble value4);
38 39
39 protected: 40 protected:
40 ~PlatformSensorAndroid() override; 41 ~PlatformSensorAndroid() override;
41 bool StartSensor(const PlatformSensorConfiguration& configuration) override; 42 bool StartSensor(const PlatformSensorConfiguration& configuration) override;
42 void StopSensor() override; 43 void StopSensor() override;
43 bool CheckSensorConfiguration( 44 bool CheckSensorConfiguration(
44 const PlatformSensorConfiguration& configuration) override; 45 const PlatformSensorConfiguration& configuration) override;
45 46
46 private: 47 private:
47 // Java object org.chromium.device.sensors.PlatformSensor 48 // Java object org.chromium.device.sensors.PlatformSensor
48 base::android::ScopedJavaGlobalRef<jobject> j_object_; 49 base::android::ScopedJavaGlobalRef<jobject> j_object_;
49 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAndroid); 50 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAndroid);
50 }; 51 };
51 52
52 } // namespace device 53 } // namespace device
53 54
54 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_ 55 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698