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> { | |
|
haraken
2016/10/19 03:07:47
What's your plan in the end? Are you planning to m
dcheng
2016/10/19 03:47:44
The idea for FrameTimer is to make it easy to see
haraken
2016/10/19 09:07:12
Yeah, I'd prefer not mixing postCancellableTask, F
| |
| 15 public: | |
| 16 using TimerFiredFunction = | |
| 17 typename TaskRunnerTimer<TimerFiredClass>::TimerFiredFunction; | |
| 18 | |
| 19 FrameTimer(TaskType taskType, | |
| 20 Document* document, | |
|
dcheng
2016/10/19 00:08:39
I'll add additional overloads as needed?
haraken
2016/10/19 03:07:48
Sure.
ExecutionContext* might be better since wor
dcheng
2016/10/19 03:47:44
Done.
| |
| 21 TimerFiredClass* timerFiredClass, | |
| 22 TimerFiredFunction timerFiredFunction) | |
| 23 : TaskRunnerTimer<TimerFiredClass>( | |
| 24 TaskRunnerHelper::get(taskType, document), | |
| 25 timerFiredClass, | |
| 26 timerFiredFunction) {} | |
| 27 }; | |
| 28 | |
| 29 } // namespace blink | |
| 30 | |
| 31 #endif // FrameTimer_h | |
| OLD | NEW |