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

Unified Diff: third_party/WebKit/Source/core/dom/TaskRunnerHelper.h

Issue 2806623004: Worker: Introduce per-global-scope task scheduler (Closed)
Patch Set: rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
diff --git a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
index d15176dc0dead87715ba29689b25106187b4e8cf..2e4da6bab83f3275cb9d232ea59829d2ef1cbde1 100644
--- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
+++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
@@ -16,6 +16,7 @@ class ExecutionContext;
class LocalFrame;
class ScriptState;
class WebTaskRunner;
+class WorkerOrWorkletGlobalScope;
enum class TaskType : unsigned {
// Speced tasks and related internal tasks should be posted to one of
@@ -121,6 +122,9 @@ enum class TaskType : unsigned {
// Tasks that must not be throttled should be posted here, but the usage
// should be very limited.
kUnthrottled,
+
+ // A new task type should be added before this.
+ kNumberOfTaskTypes,
};
// HashTraits for TaskType.
@@ -146,6 +150,8 @@ class CORE_EXPORT TaskRunnerHelper final {
static RefPtr<WebTaskRunner> Get(TaskType, Document*);
static RefPtr<WebTaskRunner> Get(TaskType, ExecutionContext*);
static RefPtr<WebTaskRunner> Get(TaskType, ScriptState*);
+
+ static RefPtr<WebTaskRunner> Get(TaskType, WorkerOrWorkletGlobalScope*);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698