Index: components/scheduler/child/scheduler_task_runner_delegate_impl.h |
diff --git a/components/scheduler/child/scheduler_task_runner_delegate_impl.h b/components/scheduler/child/scheduler_task_runner_delegate_impl.h |
index 2f18b992c68728bbdd47c47a32e3bbf9c128098e..4bec96fdb96fd1b69ee81a60bc4487b9e26cd2fd 100644 |
--- a/components/scheduler/child/scheduler_task_runner_delegate_impl.h |
+++ b/components/scheduler/child/scheduler_task_runner_delegate_impl.h |
@@ -6,6 +6,7 @@ |
#define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TASK_RUNNER_DELEGATE_IMPL_H_ |
#include "base/message_loop/message_loop.h" |
+#include "base/time/tick_clock.h" |
#include "components/scheduler/child/scheduler_task_runner_delegate.h" |
#include "components/scheduler/scheduler_export.h" |
@@ -16,7 +17,8 @@ class SCHEDULER_EXPORT SchedulerTaskRunnerDelegateImpl |
public: |
// |message_loop| is not owned and must outlive the lifetime of this object. |
static scoped_refptr<SchedulerTaskRunnerDelegateImpl> Create( |
- base::MessageLoop* message_loop); |
+ base::MessageLoop* message_loop, |
+ scoped_ptr<base::TickClock> time_source); |
// SchedulerTaskRunnerDelegate implementation |
void SetDefaultTaskRunner( |
@@ -30,16 +32,20 @@ class SCHEDULER_EXPORT SchedulerTaskRunnerDelegateImpl |
base::TimeDelta delay) override; |
bool RunsTasksOnCurrentThread() const override; |
bool IsNested() const override; |
+ base::TimeTicks NowTicks() override; |
+ void OnNoMoreWork() override; |
protected: |
~SchedulerTaskRunnerDelegateImpl() override; |
private: |
- explicit SchedulerTaskRunnerDelegateImpl(base::MessageLoop* message_loop); |
+ SchedulerTaskRunnerDelegateImpl(base::MessageLoop* message_loop, |
+ scoped_ptr<base::TickClock> time_source); |
// Not owned. |
base::MessageLoop* message_loop_; |
scoped_refptr<SingleThreadTaskRunner> message_loop_task_runner_; |
+ scoped_ptr<base::TickClock> time_source_; |
DISALLOW_COPY_AND_ASSIGN(SchedulerTaskRunnerDelegateImpl); |
}; |