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

Side by Side Diff: device/generic_sensor/platform_sensor_provider.h

Issue 2434563005: [sensors] Add a browser test to sanity check ambient light sensor. (Closed)
Patch Set: Fix Win Clang Created 4 years, 1 month 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_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/generic_sensor_export.h"
9 #include "device/generic_sensor/platform_sensor_provider_base.h" 9 #include "device/generic_sensor/platform_sensor_provider_base.h"
10 10
11 namespace device { 11 namespace device {
12 12
13 // This a singleton class returning the actual sensor provider 13 // This a singleton class returning the actual sensor provider
14 // implementation for the current platform. 14 // implementation for the current platform.
15 class DEVICE_GENERIC_SENSOR_EXPORT PlatformSensorProvider 15 class DEVICE_GENERIC_SENSOR_EXPORT PlatformSensorProvider
16 : public PlatformSensorProviderBase { 16 : public PlatformSensorProviderBase {
17 public: 17 public:
18 // Returns the PlatformSensorProvider singleton. 18 // Returns the PlatformSensorProvider singleton.
19 // Note: returns 'nullptr' if there is no available implementation for 19 // Note: returns 'nullptr' if there is no available implementation for
20 // the current platform. 20 // the current platform.
21 static PlatformSensorProvider* GetInstance(); 21 static PlatformSensorProvider* GetInstance();
22 22
23 static void SetProviderForTesting(PlatformSensorProvider* provider);
Mikhail 2016/10/24 06:41:56 nit: a short description is welcome
24
23 protected: 25 protected:
24 PlatformSensorProvider() = default; 26 PlatformSensorProvider() = default;
25 ~PlatformSensorProvider() override = default; 27 ~PlatformSensorProvider() override = default;
26 28
27 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProvider); 29 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProvider);
28 }; 30 };
29 31
30 } // namespace device 32 } // namespace device
31 33
32 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_H_ 34 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698