| 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 #include "device/generic_sensor/platform_sensor_provider_android.h" | 5 #include "services/device/generic_sensor/platform_sensor_provider_android.h" |
| 6 | 6 |
| 7 #include "base/android/scoped_java_ref.h" | 7 #include "base/android/scoped_java_ref.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "device/generic_sensor/platform_sensor_android.h" | |
| 10 #include "jni/PlatformSensorProvider_jni.h" | 9 #include "jni/PlatformSensorProvider_jni.h" |
| 10 #include "services/device/generic_sensor/platform_sensor_android.h" |
| 11 | 11 |
| 12 using base::android::AttachCurrentThread; | 12 using base::android::AttachCurrentThread; |
| 13 using base::android::ScopedJavaLocalRef; | 13 using base::android::ScopedJavaLocalRef; |
| 14 | 14 |
| 15 namespace device { | 15 namespace device { |
| 16 | 16 |
| 17 // static | 17 // static |
| 18 PlatformSensorProviderAndroid* PlatformSensorProviderAndroid::GetInstance() { | 18 PlatformSensorProviderAndroid* PlatformSensorProviderAndroid::GetInstance() { |
| 19 return base::Singleton< | 19 return base::Singleton< |
| 20 PlatformSensorProviderAndroid, | 20 PlatformSensorProviderAndroid, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 if (!sensor.obj()) | 39 if (!sensor.obj()) |
| 40 callback.Run(nullptr); | 40 callback.Run(nullptr); |
| 41 | 41 |
| 42 scoped_refptr<PlatformSensorAndroid> concrete_sensor = | 42 scoped_refptr<PlatformSensorAndroid> concrete_sensor = |
| 43 new PlatformSensorAndroid(type, std::move(mapping), this, sensor); | 43 new PlatformSensorAndroid(type, std::move(mapping), this, sensor); |
| 44 callback.Run(concrete_sensor); | 44 callback.Run(concrete_sensor); |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace device | 47 } // namespace device |
| OLD | NEW |