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

Side by Side Diff: content/renderer/device_sensors/device_sensor_event_pump.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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
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
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_
OLDNEW
« no previous file with comments | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | content/renderer/fetchers/resource_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698