| Index: content/renderer/device_sensors/device_motion_event_pump.cc
|
| diff --git a/content/renderer/device_sensors/device_motion_event_pump.cc b/content/renderer/device_sensors/device_motion_event_pump.cc
|
| index 860cf68e2f16fb18b13f6d794e047f229991d468..d8b4f1790575ec0f35b4dad5bfcde05a31c73290 100644
|
| --- a/content/renderer/device_sensors/device_motion_event_pump.cc
|
| +++ b/content/renderer/device_sensors/device_motion_event_pump.cc
|
| @@ -4,29 +4,19 @@
|
|
|
| #include "device_motion_event_pump.h"
|
|
|
| -#include "content/common/device_sensors/device_motion_messages.h"
|
| #include "content/public/renderer/render_thread.h"
|
| #include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionListener.h"
|
|
|
| namespace content {
|
|
|
| DeviceMotionEventPump::DeviceMotionEventPump(RenderThread* thread)
|
| - : DeviceSensorEventPump<blink::WebDeviceMotionListener>(thread) {
|
| -}
|
| + : DeviceSensorMojoClientMixin<
|
| + DeviceSensorEventPump<blink::WebDeviceMotionListener>,
|
| + device::mojom::MotionSensor>(thread) {}
|
|
|
| DeviceMotionEventPump::~DeviceMotionEventPump() {
|
| }
|
|
|
| -bool DeviceMotionEventPump::OnControlMessageReceived(
|
| - const IPC::Message& message) {
|
| - bool handled = true;
|
| - IPC_BEGIN_MESSAGE_MAP(DeviceMotionEventPump, message)
|
| - IPC_MESSAGE_HANDLER(DeviceMotionMsg_DidStartPolling, OnDidStart)
|
| - IPC_MESSAGE_UNHANDLED(handled = false)
|
| - IPC_END_MESSAGE_MAP()
|
| - return handled;
|
| -}
|
| -
|
| void DeviceMotionEventPump::FireEvent() {
|
| DCHECK(listener());
|
| blink::WebDeviceMotionData data;
|
| @@ -40,14 +30,6 @@ bool DeviceMotionEventPump::InitializeReader(base::SharedMemoryHandle handle) {
|
| return reader_->Initialize(handle);
|
| }
|
|
|
| -void DeviceMotionEventPump::SendStartMessage() {
|
| - RenderThread::Get()->Send(new DeviceMotionHostMsg_StartPolling());
|
| -}
|
| -
|
| -void DeviceMotionEventPump::SendStopMessage() {
|
| - RenderThread::Get()->Send(new DeviceMotionHostMsg_StopPolling());
|
| -}
|
| -
|
| void DeviceMotionEventPump::SendFakeDataForTesting(void* fake_data) {
|
| blink::WebDeviceMotionData data =
|
| *static_cast<blink::WebDeviceMotionData*>(fake_data);
|
|
|