Chromium Code Reviews| Index: device/generic_sensor/platform_sensor_ambient_light_mac.h |
| diff --git a/device/generic_sensor/platform_sensor_ambient_light_mac.h b/device/generic_sensor/platform_sensor_ambient_light_mac.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2e3bc3b61613c417db99cb235cb0fb1b353b6c63 |
| --- /dev/null |
| +++ b/device/generic_sensor/platform_sensor_ambient_light_mac.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ |
| +#define DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "device/generic_sensor/polling_platform_sensor.h" |
| + |
| +namespace device { |
| + |
| +class AmbientLightSensor; |
| + |
| +class PlatformSensorAmbientLightMac : public PollingPlatformSensor { |
| + public: |
| + PlatformSensorAmbientLightMac( |
| + mojom::SensorType type, |
| + mojo::ScopedSharedBufferMapping mapping, |
| + uint64_t buffer_size, |
| + PlatformSensorProvider* provider, |
| + scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner); |
| + |
| + mojom::ReportingMode GetReportingMode() override; |
| + void UpdateReading() override; |
| + |
| + protected: |
| + ~PlatformSensorAmbientLightMac() override; |
| + bool CheckSensorConfiguration( |
| + const PlatformSensorConfiguration& configuration) override; |
| + PlatformSensorConfiguration GetDefaultConfiguration() override; |
| + |
| + private: |
| + std::unique_ptr<AmbientLightSensor> platformSensor_; |
| + double current_lux; |
|
maksims (do not use this acc)
2016/09/20 11:41:15
nit: current_lux -> current_lux_
|
| + DISALLOW_COPY_AND_ASSIGN(PlatformSensorAmbientLightMac); |
| +}; |
| + |
| +} // namespace device |
| + |
| +#endif // DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ |