| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SERVICES_DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_ANDROID_H_ | |
| 6 #define SERVICES_DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_ANDROID_H_ | |
| 7 | |
| 8 #include "services/device/generic_sensor/platform_sensor_provider.h" | |
| 9 | |
| 10 #include "base/android/scoped_java_ref.h" | |
| 11 | |
| 12 namespace device { | |
| 13 | |
| 14 class PlatformSensorProviderAndroid : public PlatformSensorProvider { | |
| 15 public: | |
| 16 PlatformSensorProviderAndroid(); | |
| 17 ~PlatformSensorProviderAndroid() override; | |
| 18 | |
| 19 static PlatformSensorProviderAndroid* GetInstance(); | |
| 20 | |
| 21 protected: | |
| 22 void CreateSensorInternal(mojom::SensorType type, | |
| 23 mojo::ScopedSharedBufferMapping mapping, | |
| 24 const CreateSensorCallback& callback) override; | |
| 25 | |
| 26 private: | |
| 27 // Java object org.chromium.device.sensors.PlatformSensorProvider | |
| 28 base::android::ScopedJavaGlobalRef<jobject> j_object_; | |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderAndroid); | |
| 31 }; | |
| 32 | |
| 33 } // namespace device | |
| 34 | |
| 35 #endif // SERVICES_DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_ANDROID_H_ | |
| OLD | NEW |