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

Side by Side Diff: components/scheduler/child/nestable_task_runner_for_test.cc

Issue 1238483003: Revert of Redirect the MessageLoop's task runner to the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/scheduler/child/nestable_task_runner_for_test.h" 5 #include "components/scheduler/child/nestable_task_runner_for_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 9
10 namespace scheduler { 10 namespace scheduler {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 base::Bind(&NestableTaskRunnerForTest::WrapTask, 56 base::Bind(&NestableTaskRunnerForTest::WrapTask,
57 weak_nestable_task_runner_ptr_, base::Owned(wrapped_task)), 57 weak_nestable_task_runner_ptr_, base::Owned(wrapped_task)),
58 delay); 58 delay);
59 } 59 }
60 60
61 bool NestableTaskRunnerForTest::RunsTasksOnCurrentThread() const { 61 bool NestableTaskRunnerForTest::RunsTasksOnCurrentThread() const {
62 return task_runner_->RunsTasksOnCurrentThread(); 62 return task_runner_->RunsTasksOnCurrentThread();
63 } 63 }
64 64
65 bool NestableTaskRunnerForTest::IsNested() const { 65 bool NestableTaskRunnerForTest::IsNested() const {
66 return false; 66 return is_nested_;
67 }
68
69 void NestableTaskRunnerForTest::SetNested(bool is_nested) {
70 is_nested_ = is_nested;
67 } 71 }
68 72
69 void NestableTaskRunnerForTest::AddTaskObserver( 73 void NestableTaskRunnerForTest::AddTaskObserver(
70 base::MessageLoop::TaskObserver* task_observer) { 74 base::MessageLoop::TaskObserver* task_observer) {
71 task_observers_.AddObserver(task_observer); 75 task_observers_.AddObserver(task_observer);
72 } 76 }
73 77
74 void NestableTaskRunnerForTest::RemoveTaskObserver( 78 void NestableTaskRunnerForTest::RemoveTaskObserver(
75 base::MessageLoop::TaskObserver* task_observer) { 79 base::MessageLoop::TaskObserver* task_observer) {
76 task_observers_.RemoveObserver(task_observer); 80 task_observers_.RemoveObserver(task_observer);
77 } 81 }
78 82
79 } // namespace scheduler 83 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/child/nestable_task_runner_for_test.h ('k') | components/scheduler/child/scheduler_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698