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

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

Issue 987193002: Redirect the MessageLoop's task runner to the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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 is_nested_; 66 return false;
67 }
68
69 void NestableTaskRunnerForTest::SetNested(bool is_nested) {
70 is_nested_ = is_nested;
71 } 67 }
72 68
73 void NestableTaskRunnerForTest::AddTaskObserver( 69 void NestableTaskRunnerForTest::AddTaskObserver(
74 base::MessageLoop::TaskObserver* task_observer) { 70 base::MessageLoop::TaskObserver* task_observer) {
75 task_observers_.AddObserver(task_observer); 71 task_observers_.AddObserver(task_observer);
76 } 72 }
77 73
78 void NestableTaskRunnerForTest::RemoveTaskObserver( 74 void NestableTaskRunnerForTest::RemoveTaskObserver(
79 base::MessageLoop::TaskObserver* task_observer) { 75 base::MessageLoop::TaskObserver* task_observer) {
80 task_observers_.RemoveObserver(task_observer); 76 task_observers_.RemoveObserver(task_observer);
81 } 77 }
82 78
83 } // namespace scheduler 79 } // 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