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

Unified Diff: components/scheduler/child/task_queue.h

Issue 1223163006: Implement PostDelayedTaskAt for guaranteed timer ordering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include to IdleHelperTest. Created 5 years, 5 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
Index: components/scheduler/child/task_queue.h
diff --git a/components/scheduler/child/task_queue.h b/components/scheduler/child/task_queue.h
new file mode 100644
index 0000000000000000000000000000000000000000..a574c617ce0403de26dbd0d26a8293431270f486
--- /dev/null
+++ b/components/scheduler/child/task_queue.h
@@ -0,0 +1,31 @@
+// Copyright 2015 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 COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
+#define COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
+
+#include "base/single_thread_task_runner.h"
+#include "components/scheduler/scheduler_export.h"
+
+namespace scheduler {
+
+class SCHEDULER_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
+ public:
+ TaskQueue() {}
+
+ // Post a delayed task at an absolute desired run time instead of a time
+ // delta from the current time.
+ virtual bool PostDelayedTaskAt(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeTicks desired_run_time) = 0;
+
+ protected:
+ ~TaskQueue() override {}
+
+ DISALLOW_COPY_AND_ASSIGN(TaskQueue);
+};
+
+} // namespace scheduler
+
+#endif // COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
« no previous file with comments | « components/scheduler/child/scheduler_helper_unittest.cc ('k') | components/scheduler/child/task_queue_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698