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

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

Issue 2806623004: Worker: Introduce per-global-scope task scheduler (Closed)
Patch Set: remove unnecessary comments 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9389cdbcee5dd86f8dc2d2a10287962537eae4cd 100644
--- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
+++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
@@ -16,6 +16,8 @@ class ExecutionContext;
class LocalFrame;
class ScriptState;
class WebTaskRunner;
+class WorkerOrWorkletGlobalScope;
+class WorkerThread;
enum class TaskType : unsigned {
// Speced tasks and related internal tasks should be posted to one of
@@ -146,6 +148,14 @@ 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*);
+
+ // Returns a WebTaskRunner that is associated to the worker / worklet global
+ // scope that corresponds to the given WorkerThread. Note that WorkerThread is
+ // a per-global-scope object while the naming might sound differently.
+ // TODO(nhiroki): Rename WorkerThread to something that clarifies it's a
+ // per-global-scope object.
+ static RefPtr<WebTaskRunner> Get(TaskType, WorkerThread*);
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698