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

Unified Diff: components/scheduler/base/nestable_single_thread_task_runner.h

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test Created 5 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
Index: components/scheduler/base/nestable_single_thread_task_runner.h
diff --git a/components/scheduler/base/nestable_single_thread_task_runner.h b/components/scheduler/base/nestable_single_thread_task_runner.h
index 2fc7c28f2837181cd729a22dffb7ff901c108c43..ad27fa7c3ab9d9820981f5663bd18eedc67c6e46 100644
--- a/components/scheduler/base/nestable_single_thread_task_runner.h
+++ b/components/scheduler/base/nestable_single_thread_task_runner.h
@@ -5,15 +5,17 @@
#ifndef COMPONENTS_SCHEDULER_BASE_NESTABLE_SINGLE_THREAD_TASK_RUNNER_H_
#define COMPONENTS_SCHEDULER_BASE_NESTABLE_SINGLE_THREAD_TASK_RUNNER_H_
-#include "base/single_thread_task_runner.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/time/tick_clock.h"
#include "components/scheduler/scheduler_export.h"
namespace scheduler {
// A single thread task runner which exposes whether it is running nested.
class SCHEDULER_EXPORT NestableSingleThreadTaskRunner
Sami 2015/10/28 20:00:34 I think this interface needs a better name now tha
alex clarke (OOO till 29th) 2015/10/29 18:07:30 Done.
- : public base::SingleThreadTaskRunner {
+ : public base::SingleThreadTaskRunner,
+ public base::TickClock {
public:
NestableSingleThreadTaskRunner() {}
@@ -21,6 +23,10 @@ class SCHEDULER_EXPORT NestableSingleThreadTaskRunner
// a nested task).
virtual bool IsNested() const = 0;
+ // Used by the TaskQueueManager to tell us there is no more non-delayed work
+ // to do.
+ virtual void OnNoMoreWork() = 0;
Sami 2015/10/28 20:00:34 I think it's a little weird that this method is he
alex clarke (OOO till 29th) 2015/10/29 18:07:30 Turns out to be really hard to get the interface r
+
protected:
~NestableSingleThreadTaskRunner() override {}

Powered by Google App Engine
This is Rietveld 408576698