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

Unified Diff: content/renderer/device_sensors/device_light_event_pump.cc

Issue 2332903002: [sensors] [mac] Implement ambient light sensor for macOS (Closed)
Patch Set: few more nits Created 4 years, 2 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: content/renderer/device_sensors/device_light_event_pump.cc
diff --git a/content/renderer/device_sensors/device_light_event_pump.cc b/content/renderer/device_sensors/device_light_event_pump.cc
index ed2161fcb39dd09fa8678bee323fdccff09a7d57..d9ebdb0f900331b5383849aa2753e80c01e52ede 100644
--- a/content/renderer/device_sensors/device_light_event_pump.cc
+++ b/content/renderer/device_sensors/device_light_event_pump.cc
@@ -6,13 +6,14 @@
#include "base/time/time.h"
#include "content/public/renderer/render_thread.h"
+#include "device/sensors/public/cpp/device_sensors_consts.h"
#include "third_party/WebKit/public/platform/WebDeviceLightListener.h"
namespace {
// Default rate for firing of DeviceLight events.
-const int kDefaultLightPumpFrequencyHz = 5;
const int kDefaultLightPumpDelayMicroseconds =
- base::Time::kMicrosecondsPerSecond / kDefaultLightPumpFrequencyHz;
+ base::Time::kMicrosecondsPerSecond /
+ device::kDefaultAmbientLightFrequencyHz;
} // namespace
namespace content {

Powered by Google App Engine
This is Rietveld 408576698