| Index: third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc
|
| diff --git a/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc b/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e9818163c14eb59fd268618d0687ab69c1e50d19
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "platform/scheduler/child/worker_global_scope_scheduler.h"
|
| +
|
| +#include "platform/scheduler/child/worker_scheduler.h"
|
| +
|
| +namespace blink {
|
| +namespace scheduler {
|
| +
|
| +WorkerGlobalScopeScheduler::WorkerGlobalScopeScheduler(
|
| + WorkerScheduler* worker_scheduler) {
|
| + scoped_refptr<TaskQueue> task_queue =
|
| + worker_scheduler->NewUnthrottledTaskRunner(
|
| + TaskQueue::QueueType::UNTHROTTLED);
|
| + unthrottled_task_runner_ = WebTaskRunnerImpl::Create(std::move(task_queue));
|
| +}
|
| +
|
| +WorkerGlobalScopeScheduler::~WorkerGlobalScopeScheduler() {
|
| + DCHECK(!is_enabled_);
|
| +}
|
| +
|
| +void WorkerGlobalScopeScheduler::Dispose() {
|
| + unthrottled_task_runner_->GetTaskQueue()->UnregisterTaskQueue();
|
| + is_enabled_ = false;
|
| +}
|
| +
|
| +} // namespace scheduler
|
| +} // namespace blink
|
|
|