Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / browser / device_orientation / device_motion_message_filter.h
1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_DEVICE_MOTION_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_DEVICE_MOTION_MESSAGE_FILTER_H_
7
8 #include "base/compiler_specific.h"
9 #include "content/public/browser/browser_message_filter.h"
10
11 namespace content {
12
13 class DeviceMotionService;
14 class RenderProcessHost;
15
16 class DeviceMotionMessageFilter : public BrowserMessageFilter {
17  public:
18   DeviceMotionMessageFilter();
19
20   // BrowserMessageFilter implementation.
21   virtual bool OnMessageReceived(const IPC::Message& message,
22                                  bool* message_was_ok) OVERRIDE;
23
24  private:
25   virtual ~DeviceMotionMessageFilter();
26
27   void OnDeviceMotionStartPolling();
28   void OnDeviceMotionStopPolling();
29   void DidStartDeviceMotionPolling();
30
31   bool is_started_;
32
33   DISALLOW_COPY_AND_ASSIGN(DeviceMotionMessageFilter);
34 };
35
36 }  // namespace content
37
38 #endif  // CONTENT_BROWSER_RENDERER_HOST_DEVICE_MOTION_MESSAGE_FILTER_H_