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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameTimer.h

Issue 2430513003: Move some Document timers to frame-specific task runners. (Closed)
Patch Set: Created 4 years, 2 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698