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_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ | 5 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ |
6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ | 6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ |
7 | 7 |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 &DeviceSensorEventPump::FireEvent); | 85 &DeviceSensorEventPump::FireEvent); |
86 state_ = RUNNING; | 86 state_ = RUNNING; |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 virtual void FireEvent() = 0; | 90 virtual void FireEvent() = 0; |
91 virtual bool InitializeReader(base::SharedMemoryHandle handle) = 0; | 91 virtual bool InitializeReader(base::SharedMemoryHandle handle) = 0; |
92 | 92 |
93 int pump_delay_microseconds_; | 93 int pump_delay_microseconds_; |
94 PumpState state_; | 94 PumpState state_; |
95 base::RepeatingTimer<DeviceSensorEventPump> timer_; | 95 base::RepeatingTimer timer_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(DeviceSensorEventPump); | 97 DISALLOW_COPY_AND_ASSIGN(DeviceSensorEventPump); |
98 }; | 98 }; |
99 | 99 |
100 } // namespace content | 100 } // namespace content |
101 | 101 |
102 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ | 102 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ |
OLD | NEW |