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

Unified Diff: device/generic_sensor/ambient_light_mac.cc

Issue 2332903002: [sensors] [mac] Implement ambient light sensor for macOS (Closed)
Patch Set: [sensors] [mac] Implement ambient light sensor for macOS 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 side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/ambient_light_mac.cc
diff --git a/content/browser/device_sensors/ambient_light_mac.cc b/device/generic_sensor/ambient_light_mac.cc
similarity index 95%
rename from content/browser/device_sensors/ambient_light_mac.cc
rename to device/generic_sensor/ambient_light_mac.cc
index c6606791bd35ef399d186bc46e84c336f61f51a4..0d38b03e6180021099dcf2404909b6abb22835d8 100644
--- a/content/browser/device_sensors/ambient_light_mac.cc
+++ b/device/generic_sensor/ambient_light_mac.cc
@@ -4,14 +4,14 @@
// This file is based on http://osxbook.com/book/bonus/chapter10/light/
-#include "content/browser/device_sensors/ambient_light_mac.h"
+#include "device/generic_sensor/ambient_light_mac.h"
#include <utility>
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_ioobject.h"
-namespace content {
+namespace device {
namespace {
enum LmuFunctionIndex {
@@ -33,8 +33,7 @@ AmbientLightSensor::~AmbientLightSensor() {
IOServiceClose(io_connection_);
}
-AmbientLightSensor::AmbientLightSensor() : io_connection_(IO_OBJECT_NULL) {
-}
+AmbientLightSensor::AmbientLightSensor() : io_connection_(IO_OBJECT_NULL) {}
bool AmbientLightSensor::Init() {
// Tested and verified by riju that the following call works on
@@ -77,4 +76,4 @@ bool AmbientLightSensor::ReadSensorValue(uint64_t lux_values[2]) {
return kr == KERN_SUCCESS;
}
-} // namespace content
+} // namespace device

Powered by Google App Engine
This is Rietveld 408576698