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..605de4d33e5661719fa84dd675017b4062ff18b6 |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc |
@@ -0,0 +1,27 @@ |
+// 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) |
+ : worker_scheduler_(worker_scheduler) { |
+ unthrottled_task_queue_ = worker_scheduler_->NewUnthrottledTaskRunner( |
+ TaskQueue::QueueType::UNTHROTTLED); |
+ unthrottled_task_runner_ = WebTaskRunnerImpl::Create(unthrottled_task_queue_); |
+} |
+ |
+WorkerGlobalScopeScheduler::~WorkerGlobalScopeScheduler() = default; |
+ |
+void WorkerGlobalScopeScheduler::Dispose() { |
+ unthrottled_task_queue_->UnregisterTaskQueue(); |
+} |
+ |
+} // namespace scheduler |
+} // namespace blink |