OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "device_orientation_event_pump.h" | 5 #include "device_orientation_event_pump.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "content/common/device_orientation/device_orientation_messages.h" | 9 #include "content/common/device_sensors/device_orientation_messages.h" |
10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
11 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" | 11 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 const double DeviceOrientationEventPump::kOrientationThreshold = 0.1; | 15 const double DeviceOrientationEventPump::kOrientationThreshold = 0.1; |
16 | 16 |
17 DeviceOrientationEventPump::DeviceOrientationEventPump() | 17 DeviceOrientationEventPump::DeviceOrientationEventPump() |
18 : DeviceSensorEventPump(), listener_(0) { | 18 : DeviceSensorEventPump(), listener_(0) { |
19 } | 19 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 bool DeviceOrientationEventPump::SendStartMessage() { | 87 bool DeviceOrientationEventPump::SendStartMessage() { |
88 return RenderThread::Get()->Send(new DeviceOrientationHostMsg_StartPolling()); | 88 return RenderThread::Get()->Send(new DeviceOrientationHostMsg_StartPolling()); |
89 } | 89 } |
90 | 90 |
91 bool DeviceOrientationEventPump::SendStopMessage() { | 91 bool DeviceOrientationEventPump::SendStopMessage() { |
92 return RenderThread::Get()->Send(new DeviceOrientationHostMsg_StopPolling()); | 92 return RenderThread::Get()->Send(new DeviceOrientationHostMsg_StopPolling()); |
93 } | 93 } |
94 | 94 |
95 } // namespace content | 95 } // namespace content |
OLD | NEW |