OLD | NEW |
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" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 void* message_argument); | 49 void* message_argument); |
50 | 50 |
51 // IOService representing the LMU sensor. | 51 // IOService representing the LMU sensor. |
52 base::mac::ScopedIOObject<io_service_t> light_sensor_service_; | 52 base::mac::ScopedIOObject<io_service_t> light_sensor_service_; |
53 // Port used to get the notifications from the sensor. | 53 // Port used to get the notifications from the sensor. |
54 base::mac::ScopedIONotificationPortRef light_sensor_port_; | 54 base::mac::ScopedIONotificationPortRef light_sensor_port_; |
55 // IO Object used to query the value of the sensor. | 55 // IO Object used to query the value of the sensor. |
56 base::mac::ScopedIOObject<io_object_t> light_sensor_object_; | 56 base::mac::ScopedIOObject<io_object_t> light_sensor_object_; |
57 // IO Notifications created by IOServiceAddInterestNotification. | 57 // IO Notifications created by IOServiceAddInterestNotification. |
58 base::mac::ScopedIOObject<io_object_t> light_sensor_notification_; | 58 base::mac::ScopedIOObject<io_object_t> light_sensor_notification_; |
| 59 // IO Notifications created by IOServiceAddInterestNotification when the |
| 60 // sensor is busy. |
| 61 base::mac::ScopedIOObject<io_object_t> light_sensor_busy_notification_; |
59 double current_lux_; | 62 double current_lux_; |
60 | 63 |
61 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAmbientLightMac); | 64 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAmbientLightMac); |
62 }; | 65 }; |
63 | 66 |
64 } // namespace device | 67 } // namespace device |
65 | 68 |
66 #endif // DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ | 69 #endif // DEVICE_GENERIC_PLATFORM_SENSOR_AMBIENT_LIGHT_SENSOR_MAC_H_ |
OLD | NEW |