OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ | |
6 #define DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ | |
7 | |
8 #include "base/memory/ref_counted.h" | |
9 #include "device/generic_sensor/polling_platform_sensor.h" | |
10 | |
11 namespace device { | |
12 | |
13 class AmbientLightSensor; | |
14 | |
15 class PlatformSensorAmbientLightMac : public PollingPlatformSensor { | |
16 public: | |
17 PlatformSensorAmbientLightMac( | |
18 mojom::SensorType type, | |
19 mojo::ScopedSharedBufferMapping mapping, | |
20 uint64_t buffer_size, | |
21 PlatformSensorProvider* provider, | |
22 scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner); | |
23 | |
24 mojom::ReportingMode GetReportingMode() override; | |
25 void UpdateReading() override; | |
26 | |
27 protected: | |
28 ~PlatformSensorAmbientLightMac() override; | |
29 bool CheckSensorConfiguration( | |
30 const PlatformSensorConfiguration& configuration) override; | |
31 PlatformSensorConfiguration GetDefaultConfiguration() override; | |
32 | |
33 private: | |
34 std::unique_ptr<AmbientLightSensor> platformSensor_; | |
35 double current_lux; | |
maksims (do not use this acc)
2016/09/20 11:41:15
nit: current_lux -> current_lux_
| |
36 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAmbientLightMac); | |
37 }; | |
38 | |
39 } // namespace device | |
40 | |
41 #endif // DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ | |
OLD | NEW |