Index: components/scheduler/child/scheduler_task_runner_delegate_impl.h |
diff --git a/components/scheduler/child/scheduler_message_loop_delegate.h b/components/scheduler/child/scheduler_task_runner_delegate_impl.h |
similarity index 56% |
rename from components/scheduler/child/scheduler_message_loop_delegate.h |
rename to components/scheduler/child/scheduler_task_runner_delegate_impl.h |
index 164ab31768a413eb607c0d2fd14c1cda36727641..60b7571be94eeba96d7f79a8e16705502c66b71f 100644 |
--- a/components/scheduler/child/scheduler_message_loop_delegate.h |
+++ b/components/scheduler/child/scheduler_task_runner_delegate_impl.h |
@@ -2,23 +2,26 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_ |
-#define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_ |
+#ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TASK_RUNNER_DELEGATE_IMPL_H_ |
+#define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TASK_RUNNER_DELEGATE_IMPL_H_ |
#include "base/message_loop/message_loop.h" |
-#include "components/scheduler/child/nestable_single_thread_task_runner.h" |
+#include "components/scheduler/child/scheduler_task_runner_delegate.h" |
#include "components/scheduler/scheduler_export.h" |
namespace scheduler { |
-class SCHEDULER_EXPORT SchedulerMessageLoopDelegate |
- : public NestableSingleThreadTaskRunner { |
+class SCHEDULER_EXPORT SchedulerTaskRunnerDelegateImpl |
+ : public SchedulerTaskRunnerDelegate { |
public: |
// |message_loop| is not owned and must outlive the lifetime of this object. |
- static scoped_refptr<SchedulerMessageLoopDelegate> Create( |
+ static scoped_refptr<SchedulerTaskRunnerDelegateImpl> Create( |
base::MessageLoop* message_loop); |
- // NestableSingleThreadTaskRunner implementation |
+ // SchedulerTaskRunnerDelegate implementation |
+ void SetDefaultTaskRunner( |
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; |
+ void RestoreDefaultTaskRunner() override; |
bool PostDelayedTask(const tracked_objects::Location& from_here, |
const base::Closure& task, |
base::TimeDelta delay) override; |
@@ -32,17 +35,18 @@ class SCHEDULER_EXPORT SchedulerMessageLoopDelegate |
base::MessageLoop::TaskObserver* task_observer) override; |
protected: |
- ~SchedulerMessageLoopDelegate() override; |
+ ~SchedulerTaskRunnerDelegateImpl() override; |
private: |
- SchedulerMessageLoopDelegate(base::MessageLoop* message_loop); |
+ explicit SchedulerTaskRunnerDelegateImpl(base::MessageLoop* message_loop); |
// Not owned. |
base::MessageLoop* message_loop_; |
+ scoped_refptr<SingleThreadTaskRunner> message_loop_task_runner_; |
- DISALLOW_COPY_AND_ASSIGN(SchedulerMessageLoopDelegate); |
+ DISALLOW_COPY_AND_ASSIGN(SchedulerTaskRunnerDelegateImpl); |
}; |
} // namespace scheduler |
-#endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_ |
+#endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_TASK_RUNNER_DELEGATE_IMPL_H_ |