| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 namespace base { | |
| 13 class SingleThreadTaskRunner; | |
| 14 } | |
| 15 | |
| 16 namespace device { | 12 namespace device { |
| 17 | 13 |
| 18 class PlatformSensorAndroid : public PlatformSensor { | 14 class PlatformSensorAndroid : public PlatformSensor { |
| 19 public: | 15 public: |
| 20 // Register C++ methods exposed to Java using JNI. | 16 // Register C++ methods exposed to Java using JNI. |
| 21 static bool RegisterJNI(JNIEnv* env); | 17 static bool RegisterJNI(JNIEnv* env); |
| 22 | 18 |
| 23 PlatformSensorAndroid(mojom::SensorType type, | 19 PlatformSensorAndroid(mojom::SensorType type, |
| 24 mojo::ScopedSharedBufferMapping mapping, | 20 mojo::ScopedSharedBufferMapping mapping, |
| 25 PlatformSensorProvider* provider, | 21 PlatformSensorProvider* provider, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 49 | 45 |
| 50 private: | 46 private: |
| 51 // Java object org.chromium.device.sensors.PlatformSensor | 47 // Java object org.chromium.device.sensors.PlatformSensor |
| 52 base::android::ScopedJavaGlobalRef<jobject> j_object_; | 48 base::android::ScopedJavaGlobalRef<jobject> j_object_; |
| 53 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAndroid); | 49 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAndroid); |
| 54 }; | 50 }; |
| 55 | 51 |
| 56 } // namespace device | 52 } // namespace device |
| 57 | 53 |
| 58 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_ | 54 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ANDROID_H_ |
| OLD | NEW |