| OLD | NEW |
| 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 "platform/scheduler/child/scheduler_helper.h" | 5 #include "platform/scheduler/child/scheduler_helper.h" |
| 6 | 6 |
| 7 #include "base/time/default_tick_clock.h" | 7 #include "base/time/default_tick_clock.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "base/trace_event/trace_event_argument.h" | 9 #include "base/trace_event/trace_event_argument.h" |
| 10 #include "platform/scheduler/base/task_queue_impl.h" | 10 #include "platform/scheduler/base/task_queue_impl.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 task_queue_manager_->SetRecordTaskDelayHistograms( | 74 task_queue_manager_->SetRecordTaskDelayHistograms( |
| 75 record_task_delay_histograms); | 75 record_task_delay_histograms); |
| 76 } | 76 } |
| 77 | 77 |
| 78 scoped_refptr<TaskQueue> SchedulerHelper::NewTaskQueue( | 78 scoped_refptr<TaskQueue> SchedulerHelper::NewTaskQueue( |
| 79 const TaskQueue::Spec& spec) { | 79 const TaskQueue::Spec& spec) { |
| 80 DCHECK(task_queue_manager_.get()); | 80 DCHECK(task_queue_manager_.get()); |
| 81 return task_queue_manager_->NewTaskQueue(spec); | 81 return task_queue_manager_->NewTaskQueue(spec); |
| 82 } | 82 } |
| 83 | 83 |
| 84 scoped_refptr<TaskQueue> SchedulerHelper::DefaultTaskRunner() { | 84 scoped_refptr<TaskQueue> SchedulerHelper::DefaultTaskQueue() { |
| 85 CheckOnValidThread(); | 85 CheckOnValidThread(); |
| 86 return default_task_runner_; | 86 return default_task_runner_; |
| 87 } | 87 } |
| 88 | 88 |
| 89 scoped_refptr<TaskQueue> SchedulerHelper::ControlTaskRunner() { | 89 scoped_refptr<TaskQueue> SchedulerHelper::ControlTaskQueue() { |
| 90 return control_task_runner_; | 90 return control_task_runner_; |
| 91 } | 91 } |
| 92 | 92 |
| 93 size_t SchedulerHelper::GetNumberOfPendingTasks() const { | 93 size_t SchedulerHelper::GetNumberOfPendingTasks() const { |
| 94 return task_queue_manager_->GetNumberOfPendingTasks(); | 94 return task_queue_manager_->GetNumberOfPendingTasks(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void SchedulerHelper::SetWorkBatchSizeForTesting(size_t work_batch_size) { | 97 void SchedulerHelper::SetWorkBatchSizeForTesting(size_t work_batch_size) { |
| 98 CheckOnValidThread(); | 98 CheckOnValidThread(); |
| 99 DCHECK(task_queue_manager_.get()); | 99 DCHECK(task_queue_manager_.get()); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } | 187 } |
| 188 | 188 |
| 189 TaskQueue* SchedulerHelper::CurrentlyExecutingTaskQueue() const { | 189 TaskQueue* SchedulerHelper::CurrentlyExecutingTaskQueue() const { |
| 190 if (!task_queue_manager_) | 190 if (!task_queue_manager_) |
| 191 return nullptr; | 191 return nullptr; |
| 192 return task_queue_manager_->currently_executing_task_queue(); | 192 return task_queue_manager_->currently_executing_task_queue(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace scheduler | 195 } // namespace scheduler |
| 196 } // namespace blink | 196 } // namespace blink |
| OLD | NEW |