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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameTimer.h
diff --git a/third_party/WebKit/Source/core/frame/FrameTimer.h b/third_party/WebKit/Source/core/frame/FrameTimer.h
new file mode 100644
index 0000000000000000000000000000000000000000..9d2f9e5ad167268e58407021daed03887cb9bcd9
--- /dev/null
+++ b/third_party/WebKit/Source/core/frame/FrameTimer.h
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef FrameTimer_h
+#define FrameTimer_h
+
+#include "core/dom/TaskRunnerHelper.h"
+#include "platform/Timer.h"
+
+namespace blink {
+
+template <typename TimerFiredClass>
+class FrameTimer : public TaskRunnerTimer<TimerFiredClass> {
+ public:
+ using TimerFiredFunction =
+ typename TaskRunnerTimer<TimerFiredClass>::TimerFiredFunction;
+
+ FrameTimer(TaskType taskType,
alex clarke (OOO till 29th) 2016/10/19 09:15:51 I suspect it will be somewhat common for the timer
+ ExecutionContext* context,
+ TimerFiredClass* timerFiredClass,
+ TimerFiredFunction timerFiredFunction)
+ : TaskRunnerTimer<TimerFiredClass>(
+ TaskRunnerHelper::get(taskType, context),
+ timerFiredClass,
+ timerFiredFunction) {}
+};
+
+} // namespace blink
+
+#endif // FrameTimer_h
« no previous file with comments | « third_party/WebKit/Source/core/frame/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698