ffe9ff76c9b884cd2791f872f4b7cd5d226684e6
[platform/framework/web/crosswalk.git] / src / content / browser / device_sensors / device_motion_message_filter.h
1 // Copyright 2014 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_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_
7
8 #include "content/public/browser/browser_message_filter.h"
9
10 namespace content {
11
12 class DeviceMotionMessageFilter : public BrowserMessageFilter {
13  public:
14   DeviceMotionMessageFilter();
15
16   // BrowserMessageFilter implementation.
17   bool OnMessageReceived(const IPC::Message& message) override;
18
19  private:
20   ~DeviceMotionMessageFilter() override;
21
22   void OnDeviceMotionStartPolling();
23   void OnDeviceMotionStopPolling();
24   void DidStartDeviceMotionPolling();
25
26   bool is_started_;
27
28   DISALLOW_COPY_AND_ASSIGN(DeviceMotionMessageFilter);
29 };
30
31 }  // namespace content
32
33 #endif  // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_