OLD | NEW |
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 "device_motion_event_pump.h" | 5 #include "device_motion_event_pump.h" |
6 | 6 |
7 #include "content/common/device_sensors/device_motion_messages.h" | 7 #include "content/common/device_sensors/device_motion_messages.h" |
8 #include "content/public/renderer/render_thread.h" | 8 #include "content/public/renderer/render_thread.h" |
9 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" | 9 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionListener.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 DeviceMotionEventPump::DeviceMotionEventPump(RenderThread* thread) | 13 DeviceMotionEventPump::DeviceMotionEventPump(RenderThread* thread) |
14 : DeviceSensorEventPump<blink::WebDeviceMotionListener>(thread) { | 14 : DeviceSensorEventPump<blink::WebDeviceMotionListener>(thread) { |
15 } | 15 } |
16 | 16 |
17 DeviceMotionEventPump::~DeviceMotionEventPump() { | 17 DeviceMotionEventPump::~DeviceMotionEventPump() { |
18 } | 18 } |
19 | 19 |
(...skipping 29 matching lines...) Expand all Loading... |
49 } | 49 } |
50 | 50 |
51 void DeviceMotionEventPump::SendFakeDataForTesting(void* fake_data) { | 51 void DeviceMotionEventPump::SendFakeDataForTesting(void* fake_data) { |
52 blink::WebDeviceMotionData data = | 52 blink::WebDeviceMotionData data = |
53 *static_cast<blink::WebDeviceMotionData*>(fake_data); | 53 *static_cast<blink::WebDeviceMotionData*>(fake_data); |
54 | 54 |
55 listener()->didChangeDeviceMotion(data); | 55 listener()->didChangeDeviceMotion(data); |
56 } | 56 } |
57 | 57 |
58 } // namespace content | 58 } // namespace content |
OLD | NEW |