OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/public/browser/browser_message_filter.h" | 9 #include "content/public/browser/browser_message_filter.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 class DeviceMotionService; | 13 class DeviceMotionService; |
14 class RenderProcessHost; | 14 class RenderProcessHost; |
15 | 15 |
16 class DeviceMotionMessageFilter : public BrowserMessageFilter { | 16 class DeviceMotionMessageFilter : public BrowserMessageFilter { |
17 public: | 17 public: |
18 DeviceMotionMessageFilter(); | 18 DeviceMotionMessageFilter(); |
19 | 19 |
20 // BrowserMessageFilter implementation. | 20 // BrowserMessageFilter implementation. |
21 virtual bool OnMessageReceived(const IPC::Message& message, | 21 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
22 bool* message_was_ok) OVERRIDE; | |
23 | 22 |
24 private: | 23 private: |
25 virtual ~DeviceMotionMessageFilter(); | 24 virtual ~DeviceMotionMessageFilter(); |
26 | 25 |
27 void OnDeviceMotionStartPolling(); | 26 void OnDeviceMotionStartPolling(); |
28 void OnDeviceMotionStopPolling(); | 27 void OnDeviceMotionStopPolling(); |
29 void DidStartDeviceMotionPolling(); | 28 void DidStartDeviceMotionPolling(); |
30 | 29 |
31 bool is_started_; | 30 bool is_started_; |
32 | 31 |
33 DISALLOW_COPY_AND_ASSIGN(DeviceMotionMessageFilter); | 32 DISALLOW_COPY_AND_ASSIGN(DeviceMotionMessageFilter); |
34 }; | 33 }; |
35 | 34 |
36 } // namespace content | 35 } // namespace content |
37 | 36 |
38 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_ | 37 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_ |
OLD | NEW |