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

Side by Side Diff: services/device/generic_sensor/platform_sensor_provider_linux.h

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 #ifndef DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ 5 #ifndef SERVICES_DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_
6 #define DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ 6 #define SERVICES_DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_
7 7
8 #include "device/generic_sensor/platform_sensor_provider.h" 8 #include "services/device/generic_sensor/platform_sensor_provider.h"
9 9
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "device/generic_sensor/generic_sensor_export.h" 11 #include "services/device/generic_sensor/linux/sensor_device_manager.h"
12 #include "device/generic_sensor/linux/sensor_device_manager.h"
13 12
14 namespace base { 13 namespace base {
15 template <typename T> 14 template <typename T>
16 struct DefaultSingletonTraits; 15 struct DefaultSingletonTraits;
17 class Thread; 16 class Thread;
18 } 17 }
19 18
20 namespace device { 19 namespace device {
21 20
22 struct SensorInfoLinux; 21 struct SensorInfoLinux;
23 22
24 class DEVICE_GENERIC_SENSOR_EXPORT PlatformSensorProviderLinux 23 class PlatformSensorProviderLinux : public PlatformSensorProvider,
25 : public PlatformSensorProvider, 24 public SensorDeviceManager::Delegate {
26 public SensorDeviceManager::Delegate {
27 public: 25 public:
28 static PlatformSensorProviderLinux* GetInstance(); 26 static PlatformSensorProviderLinux* GetInstance();
29 27
30 // Sets another service provided by tests. 28 // Sets another service provided by tests.
31 void SetSensorDeviceManagerForTesting( 29 void SetSensorDeviceManagerForTesting(
32 std::unique_ptr<SensorDeviceManager> sensor_device_manager); 30 std::unique_ptr<SensorDeviceManager> sensor_device_manager);
33 31
34 // Sets task runner for tests. 32 // Sets task runner for tests.
35 void SetFileTaskRunnerForTesting( 33 void SetFileTaskRunnerForTesting(
36 scoped_refptr<base::SingleThreadTaskRunner> task_runner); 34 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Browser's file thread task runner passed from renderer. Used by this 110 // Browser's file thread task runner passed from renderer. Used by this
113 // provider to stop a polling thread and passed to a manager that 111 // provider to stop a polling thread and passed to a manager that
114 // runs a linux device monitor service on this task runner. 112 // runs a linux device monitor service on this task runner.
115 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 113 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
116 114
117 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderLinux); 115 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderLinux);
118 }; 116 };
119 117
120 } // namespace device 118 } // namespace device
121 119
122 #endif // DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ 120 #endif // SERVICES_DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698