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

Side by Side Diff: device/device_sensors/ambient_light_mac.h

Issue 1164563003: Extract device_sensors to /device via Mojofication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « device/device_sensors/OWNERS ('k') | device/device_sensors/ambient_light_mac.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_BROWSER_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_ 5 #ifndef DEVICE_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_
6 #define CONTENT_BROWSER_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_ 6 #define DEVICE_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_
7 7
8 #include <IOKit/IOKitLib.h> 8 #include <IOKit/IOKitLib.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace content { 12 namespace device {
13 13
14 // Provides an interface to retrieve ambient light data from MacBooks. 14 // Provides an interface to retrieve ambient light data from MacBooks.
15 class AmbientLightSensor { 15 class AmbientLightSensor {
16 public: 16 public:
17 // Create AmbientLightSensor object, return NULL if no valid is sensor found. 17 // Create AmbientLightSensor object, return NULL if no valid is sensor found.
18 static scoped_ptr<AmbientLightSensor> Create(); 18 static scoped_ptr<AmbientLightSensor> Create();
19 19
20 ~AmbientLightSensor(); 20 ~AmbientLightSensor();
21 21
22 // Retrieve lux values from Ambient Light Sensor. 22 // Retrieve lux values from Ambient Light Sensor.
23 bool ReadSensorValue(uint64_t lux_value[2]); 23 bool ReadSensorValue(uint64_t lux_value[2]);
24 24
25 private: 25 private:
26 AmbientLightSensor(); 26 AmbientLightSensor();
27 27
28 // Probe the local hardware looking for Ambient Light sensor and 28 // Probe the local hardware looking for Ambient Light sensor and
29 // initialize an I/O connection to it. 29 // initialize an I/O connection to it.
30 bool Init(); 30 bool Init();
31 31
32 // IOKit connection to the local sensor. 32 // IOKit connection to the local sensor.
33 io_connect_t io_connection_; 33 io_connect_t io_connection_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(AmbientLightSensor); 35 DISALLOW_COPY_AND_ASSIGN(AmbientLightSensor);
36 }; 36 };
37 37
38 } // namespace content 38 } // namespace device
39 39
40 #endif // CONTENT_BROWSER_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_ 40 #endif // DEVICE_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_
OLDNEW
« no previous file with comments | « device/device_sensors/OWNERS ('k') | device/device_sensors/ambient_light_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698