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

Side by Side Diff: content/browser/device_orientation/motion_message_filter.cc

Issue 10698046: Implements part of Device Motion in the Renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resets last_motion_ Created 8 years, 4 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 (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 content {
14
15 MotionMessageFilter::MotionMessageFilter()
16 : MessageFilter(DeviceData::kTypeMotion) {
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 content
OLDNEW
« no previous file with comments | « content/browser/device_orientation/motion_message_filter.h ('k') | content/browser/device_orientation/observer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698