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

Side by Side Diff: services/device/generic_sensor/platform_sensor_provider_android.cc

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase Created 3 years, 7 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 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698