| 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 f2fa5cb6ea0f6a608514dfc26eed3f87bdc25c45..46fa7fa1f303f9c35c601f2b3678f8e331d0ca10 100644
|
| --- a/content/renderer/device_sensors/device_light_event_pump.cc
|
| +++ b/content/renderer/device_sensors/device_light_event_pump.cc
|
| @@ -4,13 +4,17 @@
|
|
|
| #include "content/renderer/device_sensors/device_light_event_pump.h"
|
|
|
| +#include "base/basictypes.h"
|
| +#include "base/time/time.h"
|
| #include "content/common/device_sensors/device_light_messages.h"
|
| #include "content/public/renderer/render_thread.h"
|
| #include "third_party/WebKit/public/platform/WebDeviceLightListener.h"
|
|
|
| namespace {
|
| -// Default delay between subsequent firing of DeviceLight events.
|
| -const int kDefaultLightPumpDelayMillis = 200;
|
| +// Default rate for firing of DeviceLight events.
|
| +const int64 kDefaultLightPumpFrequencyHz = 5;
|
| +const int64 kDefaultLightPumpDelayMicroseconds =
|
| + base::Time::kMicrosecondsPerSecond / kDefaultLightPumpFrequencyHz;
|
| } // namespace
|
|
|
| namespace content {
|
| @@ -18,7 +22,7 @@ namespace content {
|
| DeviceLightEventPump::DeviceLightEventPump(RenderThread* thread)
|
| : DeviceSensorEventPump<blink::WebDeviceLightListener>(thread),
|
| last_seen_data_(-1) {
|
| - pump_delay_millis_ = kDefaultLightPumpDelayMillis;
|
| + pump_delay_microseconds_ = kDefaultLightPumpDelayMicroseconds;
|
| }
|
|
|
| DeviceLightEventPump::~DeviceLightEventPump() {
|
|
|