OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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/browser/device_orientation/motion_message_filter.h" | |
6 | |
7 #include "content/browser/device_orientation/device_data.h" | |
8 #include "content/common/device_motion_messages.h" | |
9 #include "content/public/browser/browser_thread.h" | |
10 | |
11 using content::BrowserThread; | |
12 | |
13 namespace device_orientation { | |
14 | |
15 MotionMessageFilter::MotionMessageFilter() | |
16 : MessageFilter(DeviceData::kTypeMotion) { | |
hans
2012/08/13 13:35:19
ultra nit: looks like an extra space between the :
aousterh
2012/08/16 15:23:49
Done.
| |
17 } | |
18 | |
19 MotionMessageFilter::~MotionMessageFilter() { | |
20 } | |
21 | |
22 bool MotionMessageFilter::OnMessageReceived(const IPC::Message& message, | |
23 bool* message_was_ok) { | |
24 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
25 bool handled = true; | |
26 IPC_BEGIN_MESSAGE_MAP_EX(MotionMessageFilter, message, *message_was_ok) | |
27 IPC_MESSAGE_HANDLER(DeviceMotionHostMsg_StartUpdating, OnStartUpdating) | |
28 IPC_MESSAGE_HANDLER(DeviceMotionHostMsg_StopUpdating, OnStopUpdating) | |
29 IPC_MESSAGE_UNHANDLED(handled = false) | |
30 IPC_END_MESSAGE_MAP() | |
31 return handled; | |
32 } | |
33 | |
34 } // namespace device_orientation | |
OLD | NEW |