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_motion_event_pump.h" | 5 #include "device_motion_event_pump.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "content/common/device_motion_messages.h" | 12 #include "content/common/device_motion_messages.h" |
13 #include "content/public/renderer/render_thread.h" | 13 #include "content/public/renderer/render_thread.h" |
14 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" | 14 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 const double DeviceMotionEventPump::kPumpDelayMillis = 40; | 18 const double DeviceMotionEventPump::kPumpDelayMillis = 40; |
19 | 19 |
20 double DeviceMotionEventPump::GetDelayMillis() { | 20 double DeviceMotionEventPump::GetDelayMillis() { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool handled = true; | 108 bool handled = true; |
109 IPC_BEGIN_MESSAGE_MAP(DeviceMotionEventPump, message) | 109 IPC_BEGIN_MESSAGE_MAP(DeviceMotionEventPump, message) |
110 IPC_MESSAGE_HANDLER(DeviceMotionMsg_DidStartPolling, | 110 IPC_MESSAGE_HANDLER(DeviceMotionMsg_DidStartPolling, |
111 OnDidStartDeviceMotion) | 111 OnDidStartDeviceMotion) |
112 IPC_MESSAGE_UNHANDLED(handled = false) | 112 IPC_MESSAGE_UNHANDLED(handled = false) |
113 IPC_END_MESSAGE_MAP() | 113 IPC_END_MESSAGE_MAP() |
114 return handled; | 114 return handled; |
115 } | 115 } |
116 | 116 |
117 } // namespace content | 117 } // namespace content |
OLD | NEW |