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

Side by Side Diff: content/renderer/device_sensors/device_light_event_pump.cc

Issue 2819273006: Move //device/sensor impl to be part of the internal implemenation of the Device Service. (Closed)
Patch Set: Move //device/sensor impl to be part of the internal implemenation of the Device Service Created 3 years, 8 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/renderer/device_sensors/device_light_event_pump.h" 5 #include "content/renderer/device_sensors/device_light_event_pump.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "content/public/renderer/render_thread.h" 8 #include "content/public/renderer/render_thread.h"
9 #include "device/sensors/public/cpp/device_sensors_consts.h" 9 #include "services/device/public/cpp/sensors/device_sensors_consts.h"
10 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" 10 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h"
11 11
12 namespace { 12 namespace {
13 // Default rate for firing of DeviceLight events. 13 // Default rate for firing of DeviceLight events.
14 const int kDefaultLightPumpDelayMicroseconds = 14 const int kDefaultLightPumpDelayMicroseconds =
15 base::Time::kMicrosecondsPerSecond / 15 base::Time::kMicrosecondsPerSecond /
16 device::kDefaultAmbientLightFrequencyHz; 16 device::kDefaultAmbientLightFrequencyHz;
17 } // namespace 17 } // namespace
18 18
19 namespace content { 19 namespace content {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return reader_->Initialize(handle); 56 return reader_->Initialize(handle);
57 } 57 }
58 58
59 void DeviceLightEventPump::SendFakeDataForTesting(void* fake_data) { 59 void DeviceLightEventPump::SendFakeDataForTesting(void* fake_data) {
60 double data = *static_cast<double*>(fake_data); 60 double data = *static_cast<double*>(fake_data);
61 61
62 listener()->DidChangeDeviceLight(data); 62 listener()->DidChangeDeviceLight(data);
63 } 63 }
64 64
65 } // namespace content 65 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698