Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 FrameTimer_h | |
| 6 #define FrameTimer_h | |
| 7 | |
| 8 #include "core/dom/TaskRunnerHelper.h" | |
| 9 #include "platform/Timer.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 template <typename TimerFiredClass> | |
| 14 class FrameTimer : public TaskRunnerTimer<TimerFiredClass> { | |
| 15 public: | |
| 16 using TimerFiredFunction = | |
| 17 typename TaskRunnerTimer<TimerFiredClass>::TimerFiredFunction; | |
| 18 | |
| 19 FrameTimer(TaskType taskType, | |
|
alex clarke (OOO till 29th)
2016/10/19 09:15:51
I suspect it will be somewhat common for the timer
| |
| 20 ExecutionContext* context, | |
| 21 TimerFiredClass* timerFiredClass, | |
| 22 TimerFiredFunction timerFiredFunction) | |
| 23 : TaskRunnerTimer<TimerFiredClass>( | |
| 24 TaskRunnerHelper::get(taskType, context), | |
| 25 timerFiredClass, | |
| 26 timerFiredFunction) {} | |
| 27 }; | |
| 28 | |
| 29 } // namespace blink | |
| 30 | |
| 31 #endif // FrameTimer_h | |
| OLD | NEW |