Index: cc/test/ordered_simple_task_runner.h |
diff --git a/cc/test/ordered_simple_task_runner.h b/cc/test/ordered_simple_task_runner.h |
index 8850a760bf88de7fb7f7df663324271809d3e8c2..19d689dc559103f3cd77047daa9e9eacf77323e4 100644 |
--- a/cc/test/ordered_simple_task_runner.h |
+++ b/cc/test/ordered_simple_task_runner.h |
@@ -5,8 +5,12 @@ |
#ifndef CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ |
#define CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ |
+#include <deque> |
+ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/debug/trace_event.h" |
+#include "base/logging.h" |
#include "base/test/test_simple_task_runner.h" |
namespace cc { |
@@ -16,14 +20,36 @@ namespace cc { |
// which don't have a delay even though it is queued early. |
class OrderedSimpleTaskRunner : public base::TestSimpleTaskRunner { |
public: |
- OrderedSimpleTaskRunner(); |
- |
+ explicit OrderedSimpleTaskRunner(bool advance_now = true); |
Sami
2014/08/19 18:45:04
No default arguments in chromium please :P
mithro-old
2014/08/21 17:39:18
How does one do this otherwise?
|
+ |
Sami
2014/08/19 18:45:04
// base::TestSimpleTaskRunner implementation:
mithro-old
2014/08/21 17:39:18
Done.
|
+ virtual bool PostDelayedTask(const tracked_objects::Location& from_here, |
+ const base::Closure& task, |
+ base::TimeDelta delay) OVERRIDE; |
+ virtual bool PostNonNestableDelayedTask( |
Sami
2014/08/19 18:45:04
Just curious: do we ever post non-nestable tasks f
mithro-old
2014/08/21 17:39:19
No idea. I do think this task runner could possibl
|
+ const tracked_objects::Location& from_here, |
+ const base::Closure& task, |
+ base::TimeDelta delay) OVERRIDE; |
virtual void RunPendingTasks() OVERRIDE; |
+ base::TimeTicks Now() const; |
brianderson
2014/08/20 20:04:31
protected not public.
mithro-old
2014/08/21 17:39:19
Done.
|
+ base::TimeDelta DelayToNextPendingTask(); |
+ void SetAutoAdvanceNowToPendingTasks(bool advance_now); |
+ void SetNow(base::TimeTicks time); |
brianderson
2014/08/20 20:04:31
Remove this.
mithro-old
2014/08/21 17:39:19
Done.
|
+ |
+ scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; |
+ |
protected: |
virtual ~OrderedSimpleTaskRunner(); |
+ static void SortTasks(std::deque<base::TestPendingTask>* tasks); |
+ |
private: |
+ bool advance_now_; |
+ base::TimeTicks now_; |
+ bool inside_run_pending_tasks_; |
+ |
+ friend void PrintTo(const OrderedSimpleTaskRunner& t, ::std::ostream* os); |
+ |
DISALLOW_COPY_AND_ASSIGN(OrderedSimpleTaskRunner); |
}; |