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

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

Issue 2332903002: [sensors] [mac] Implement ambient light sensor for macOS (Closed)
Patch Set: Fix comments from Mikhail Created 4 years, 3 months 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698