| 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/platform_sensor_mac.h" | 
|  | 10 | 
|  | 11 namespace device { | 
|  | 12 | 
|  | 13 class AmbientLightSensor; | 
|  | 14 | 
|  | 15 class PlatformSensorAmbientLightMac : public PlatformSensorMac { | 
|  | 16  public: | 
|  | 17   PlatformSensorAmbientLightMac( | 
|  | 18       mojom::SensorType type, | 
|  | 19       mojo::ScopedSharedBufferMapping mapping, | 
|  | 20       uint64_t buffer_size, | 
|  | 21       PlatformSensorProvider* provider, | 
|  | 22       const scoped_refptr<base::SingleThreadTaskRunner>& | 
|  | 23           polling_thread_task_runner); | 
|  | 24 | 
|  | 25   mojom::ReportingMode GetReportingMode() override; | 
|  | 26   void UpdateReading() override; | 
|  | 27 | 
|  | 28  protected: | 
|  | 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; | 
|  | 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 | 
|---|