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

Unified Diff: Source/core/workers/InProcessWorkerBase.cpp

Issue 1190133002: Remove WorkerScriptLoaderClient and inheritances (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review #6 and #7 Created 5 years, 6 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 | « Source/core/workers/InProcessWorkerBase.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/InProcessWorkerBase.cpp
diff --git a/Source/core/workers/InProcessWorkerBase.cpp b/Source/core/workers/InProcessWorkerBase.cpp
index c590386456e42be379d9d09d4118a60d27413367..69815d08e7bc477420b4ca1d8a668395c8bc0816 100644
--- a/Source/core/workers/InProcessWorkerBase.cpp
+++ b/Source/core/workers/InProcessWorkerBase.cpp
@@ -51,8 +51,13 @@ bool InProcessWorkerBase::initialize(ExecutionContext* context, const String& ur
if (scriptURL.isEmpty())
return false;
- m_scriptLoader = WorkerScriptLoader::create();
- m_scriptLoader->loadAsynchronously(*context, scriptURL, DenyCrossOriginRequests, this);
+ m_scriptLoader = adoptPtr(new WorkerScriptLoader());
+ m_scriptLoader->loadAsynchronously(
+ *context,
+ scriptURL,
+ DenyCrossOriginRequests,
+ bind(&InProcessWorkerBase::onResponse, this),
+ bind(&InProcessWorkerBase::onFinished, this));
m_contextProxy = createWorkerGlobalScopeProxy(context);
@@ -83,12 +88,12 @@ PassRefPtr<ContentSecurityPolicy> InProcessWorkerBase::contentSecurityPolicy()
return m_contentSecurityPolicy;
}
-void InProcessWorkerBase::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
+void InProcessWorkerBase::onResponse()
{
- InspectorInstrumentation::didReceiveScriptResponse(executionContext(), identifier);
+ InspectorInstrumentation::didReceiveScriptResponse(executionContext(), m_scriptLoader->identifier());
}
-void InProcessWorkerBase::notifyFinished()
+void InProcessWorkerBase::onFinished()
{
if (m_scriptLoader->failed()) {
dispatchEvent(Event::createCancelable(EventTypeNames::error));
« no previous file with comments | « Source/core/workers/InProcessWorkerBase.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698