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

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

Issue 2542903002: device: Cleanup class/struct forward declarations (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « device/gamepad/gamepad_test_helpers.h ('k') | device/generic_sensor/platform_sensor_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ 5 #ifndef DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_
6 #define DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ 6 #define DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_
7 7
8 #include <IOKit/IOKitLib.h> 8 #include <IOKit/IOKitLib.h>
9 9
10 #include "base/mac/scoped_ionotificationportref.h" 10 #include "base/mac/scoped_ionotificationportref.h"
11 #include "base/mac/scoped_ioobject.h" 11 #include "base/mac/scoped_ioobject.h"
12 #include "device/generic_sensor/platform_sensor.h" 12 #include "device/generic_sensor/platform_sensor.h"
13 13
14 namespace base {
15 class SingleThreadTaskRunner;
16 }
17
18 namespace device { 14 namespace device {
19 15
20 // Implementation of PlatformSensor for macOS to query the ambient light sensor. 16 // Implementation of PlatformSensor for macOS to query the ambient light sensor.
21 // This is a single instance object per browser process which is created by 17 // This is a single instance object per browser process which is created by
22 // The singleton PlatformSensorProviderMac. If there are no clients, this 18 // The singleton PlatformSensorProviderMac. If there are no clients, this
23 // instance is not created. 19 // instance is not created.
24 class PlatformSensorAmbientLightMac : public PlatformSensor { 20 class PlatformSensorAmbientLightMac : public PlatformSensor {
25 public: 21 public:
26 // Construct a platform sensor of |type| AMBIENT_LIGHT, given 22 // Construct a platform sensor of |type| AMBIENT_LIGHT, given
27 // a buffer |mapping| to write the result back. |task_runner| is 23 // a buffer |mapping| to write the result back. |task_runner| is
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // sensor is busy. 56 // sensor is busy.
61 base::mac::ScopedIOObject<io_object_t> light_sensor_busy_notification_; 57 base::mac::ScopedIOObject<io_object_t> light_sensor_busy_notification_;
62 double current_lux_; 58 double current_lux_;
63 59
64 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAmbientLightMac); 60 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAmbientLightMac);
65 }; 61 };
66 62
67 } // namespace device 63 } // namespace device
68 64
69 #endif // DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ 65 #endif // DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_
OLDNEW
« no previous file with comments | « device/gamepad/gamepad_test_helpers.h ('k') | device/generic_sensor/platform_sensor_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698