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_PROVIDER_H_ | 5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_H_ |
6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_H_ | 6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_H_ |
7 | 7 |
| 8 #include "device/generic_sensor/generic_sensor_export.h" |
8 #include "device/generic_sensor/platform_sensor_provider_base.h" | 9 #include "device/generic_sensor/platform_sensor_provider_base.h" |
9 | 10 |
10 namespace device { | 11 namespace device { |
11 | 12 |
12 // This a singleton class returning the actual sensor provider | 13 // This a singleton class returning the actual sensor provider |
13 // implementation for the current platform. | 14 // implementation for the current platform. |
14 class PlatformSensorProvider : public PlatformSensorProviderBase { | 15 class DEVICE_GENERIC_SENSOR_EXPORT PlatformSensorProvider |
| 16 : public PlatformSensorProviderBase { |
15 public: | 17 public: |
16 // Returns the PlatformSensorProvider singleton. | 18 // Returns the PlatformSensorProvider singleton. |
17 // Note: returns 'nullptr' if there is no available implementation for | 19 // Note: returns 'nullptr' if there is no available implementation for |
18 // the current platform. | 20 // the current platform. |
19 static PlatformSensorProvider* GetInstance(); | 21 static PlatformSensorProvider* GetInstance(); |
20 | 22 |
21 protected: | 23 protected: |
22 PlatformSensorProvider() = default; | 24 PlatformSensorProvider() = default; |
23 ~PlatformSensorProvider() override = default; | 25 ~PlatformSensorProvider() override = default; |
24 | 26 |
25 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProvider); | 27 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProvider); |
26 }; | 28 }; |
27 | 29 |
28 } // namespace device | 30 } // namespace device |
29 | 31 |
30 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_H_ | 32 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_H_ |
OLD | NEW |