Index: third_party/WebKit/Source/core/workers/WorkerScript.h |
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.h b/third_party/WebKit/Source/core/workers/WorkerScript.h |
similarity index 90% |
rename from third_party/WebKit/Source/core/workers/WorkerThread.h |
rename to third_party/WebKit/Source/core/workers/WorkerScript.h |
index f25b045fdb2a6db91e986ef9a5ed13fe30430ab4..1c70f5f3e7797c66b276e95b925bb0e01f9730e3 100644 |
--- a/third_party/WebKit/Source/core/workers/WorkerThread.h |
+++ b/third_party/WebKit/Source/core/workers/WorkerScript.h |
@@ -24,8 +24,8 @@ |
* |
*/ |
-#ifndef WorkerThread_h |
-#define WorkerThread_h |
+#ifndef WorkerScript_h |
+#define WorkerScript_h |
#include "core/CoreExport.h" |
#include "core/dom/ExecutionContextTask.h" |
@@ -47,20 +47,19 @@ class WorkerGlobalScope; |
class WorkerInspectorController; |
class WorkerMicrotaskRunner; |
class WorkerReportingProxy; |
-class WorkerThreadStartupData; |
+class WorkerScriptStartupData; |
-enum WorkerThreadStartMode { |
+enum WorkerScriptStartMode { |
DontPauseWorkerGlobalScopeOnStart, |
PauseWorkerGlobalScopeOnStart |
}; |
-// TODO(sadrul): Rename to WorkerScript. |
-class CORE_EXPORT WorkerThread : public RefCounted<WorkerThread> { |
+class CORE_EXPORT WorkerScript : public RefCounted<WorkerScript> { |
public: |
- virtual ~WorkerThread(); |
+ virtual ~WorkerScript(); |
// Called on the main thread. |
- void start(PassOwnPtr<WorkerThreadStartupData>); |
+ void start(PassOwnPtr<WorkerScriptStartupData>); |
void terminate(); |
// Returns the thread this worker runs on. Some implementations can create |
@@ -69,8 +68,8 @@ public: |
// used by other workers (e.g. compositor workers). |
virtual WebThreadSupportingGC& backingThread() = 0; |
- virtual void didStartWorkerThread(); |
- virtual void willStopWorkerThread(); |
+ virtual void didStartWorkerScript(); |
+ virtual void willStopWorkerScript(); |
kinuko
2016/02/24 12:54:51
Embedder / content expects these are actually call
|
v8::Isolate* isolate() const { return m_isolate; } |
@@ -116,8 +115,8 @@ public: |
// Returns true once one of the terminate* methods is called. |
bool terminated(); |
- // Number of active worker threads. |
- static unsigned workerThreadCount(); |
+ // Number of active worker scripts. |
+ static unsigned workerScriptCount(); |
PlatformThreadId platformThreadId(); |
@@ -125,10 +124,10 @@ public: |
void setWorkerInspectorController(WorkerInspectorController*); |
protected: |
- WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&); |
+ WorkerScript(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&); |
// Factory method for creating a new worker context for the thread. |
- virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupData>) = 0; |
+ virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(PassOwnPtr<WorkerScriptStartupData>) = 0; |
virtual void postInitialize() { } |
@@ -151,7 +150,7 @@ private: |
void terminateInternal(); |
// Called on the worker thread. |
- void initialize(PassOwnPtr<WorkerThreadStartupData>); |
+ void initialize(PassOwnPtr<WorkerScriptStartupData>); |
void shutdown(); |
void performTask(PassOwnPtr<ExecutionContextTask>, bool isInstrumented); |
void performShutdownTask(); |
@@ -186,4 +185,4 @@ private: |
} // namespace blink |
-#endif // WorkerThread_h |
+#endif // WorkerScript_h |