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

Side by Side Diff: content/browser/device_sensors/ambient_light_mac.h

Issue 2646093002: Move //content/browser/device_sensor/ into device/sensors (Closed)
Patch Set: gn format & code rebase Created 3 years, 10 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 2015 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 CONTENT_BROWSER_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_
6 #define CONTENT_BROWSER_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_
7
8 #include <IOKit/IOKitLib.h>
9 #include <stdint.h>
10
11 #include <memory>
12
13 #include "base/macros.h"
14
15 namespace content {
16
17 // Provides an interface to retrieve ambient light data from MacBooks.
18 class AmbientLightSensor {
19 public:
20 // Create AmbientLightSensor object, return NULL if no valid is sensor found.
21 static std::unique_ptr<AmbientLightSensor> Create();
22
23 ~AmbientLightSensor();
24
25 // Retrieve lux values from Ambient Light Sensor.
26 bool ReadSensorValue(uint64_t lux_value[2]);
27
28 private:
29 AmbientLightSensor();
30
31 // Probe the local hardware looking for Ambient Light sensor and
32 // initialize an I/O connection to it.
33 bool Init();
34
35 // IOKit connection to the local sensor.
36 io_connect_t io_connection_;
37
38 DISALLOW_COPY_AND_ASSIGN(AmbientLightSensor);
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_BROWSER_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_
OLDNEW
« no previous file with comments | « content/browser/device_sensors/DEPS ('k') | content/browser/device_sensors/ambient_light_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698