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

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

Issue 2037513002: Convert device_sensors to use mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@conversion--mime-registry
Patch Set: Created 4 years, 5 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/renderer/device_sensors/device_orientation_absolute_event_pump .h"
6
7 #include "content/common/device_sensors/device_orientation_messages.h"
8 #include "content/public/renderer/render_thread.h"
9 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic eOrientationListener.h"
10
11 namespace content {
12
13 DeviceOrientationAbsoluteEventPump::DeviceOrientationAbsoluteEventPump(
14 RenderThread* thread) : DeviceOrientationEventPump(thread) {
15 }
16
17 DeviceOrientationAbsoluteEventPump::~DeviceOrientationAbsoluteEventPump() {
18 }
19
20 bool DeviceOrientationAbsoluteEventPump::OnControlMessageReceived(
21 const IPC::Message& message) {
22 bool handled = true;
23 IPC_BEGIN_MESSAGE_MAP(DeviceOrientationAbsoluteEventPump, message)
24 IPC_MESSAGE_HANDLER(DeviceOrientationAbsoluteMsg_DidStartPolling,
25 OnDidStart)
26 IPC_MESSAGE_UNHANDLED(handled = false)
27 IPC_END_MESSAGE_MAP()
28 return handled;
29 }
30
31 void DeviceOrientationAbsoluteEventPump::SendStartMessage() {
32 RenderThread::Get()->Send(
33 new DeviceOrientationAbsoluteHostMsg_StartPolling());
34 }
35
36 void DeviceOrientationAbsoluteEventPump::SendStopMessage() {
37 RenderThread::Get()->Send(new DeviceOrientationAbsoluteHostMsg_StopPolling());
38 }
39
40 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698