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

Side by Side Diff: third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp

Issue 1888703002: Worker: Rename worker components to clarify what they work for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing files Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/workers/InProcessWorkerBase.h" 5 #include "core/workers/InProcessWorkerBase.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/events/MessageEvent.h" 8 #include "core/events/MessageEvent.h"
9 #include "core/fetch/ResourceFetcher.h" 9 #include "core/fetch/ResourceFetcher.h"
10 #include "core/frame/LocalDOMWindow.h" 10 #include "core/frame/LocalDOMWindow.h"
11 #include "core/frame/csp/ContentSecurityPolicy.h" 11 #include "core/frame/csp/ContentSecurityPolicy.h"
12 #include "core/inspector/InspectorInstrumentation.h" 12 #include "core/inspector/InspectorInstrumentation.h"
13 #include "core/workers/WorkerGlobalScopeProxy.h" 13 #include "core/workers/InProcessWorkerGlobalScopeProxy.h"
14 #include "core/workers/WorkerScriptLoader.h" 14 #include "core/workers/WorkerScriptLoader.h"
15 #include "core/workers/WorkerThread.h" 15 #include "core/workers/WorkerThread.h"
16 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" 16 #include "platform/network/ContentSecurityPolicyResponseHeaders.h"
17 17
18 namespace blink { 18 namespace blink {
19 19
20 InProcessWorkerBase::InProcessWorkerBase(ExecutionContext* context) 20 InProcessWorkerBase::InProcessWorkerBase(ExecutionContext* context)
21 : AbstractWorker(context) 21 : AbstractWorker(context)
22 , ActiveScriptWrappable(this) 22 , ActiveScriptWrappable(this)
23 , m_contextProxy(nullptr) 23 , m_contextProxy(nullptr)
(...skipping 28 matching lines...) Expand all
52 52
53 m_scriptLoader = WorkerScriptLoader::create(); 53 m_scriptLoader = WorkerScriptLoader::create();
54 m_scriptLoader->loadAsynchronously( 54 m_scriptLoader->loadAsynchronously(
55 *context, 55 *context,
56 scriptURL, 56 scriptURL,
57 DenyCrossOriginRequests, 57 DenyCrossOriginRequests,
58 context->securityContext().addressSpace(), 58 context->securityContext().addressSpace(),
59 bind(&InProcessWorkerBase::onResponse, this), 59 bind(&InProcessWorkerBase::onResponse, this),
60 bind(&InProcessWorkerBase::onFinished, this)); 60 bind(&InProcessWorkerBase::onFinished, this));
61 61
62 m_contextProxy = createWorkerGlobalScopeProxy(context); 62 m_contextProxy = createInProcessWorkerGlobalScopeProxy(context);
63 63
64 return true; 64 return true;
65 } 65 }
66 66
67 void InProcessWorkerBase::terminate() 67 void InProcessWorkerBase::terminate()
68 { 68 {
69 if (m_contextProxy) 69 if (m_contextProxy)
70 m_contextProxy->terminateWorkerGlobalScope(); 70 m_contextProxy->terminateWorkerGlobalScope();
71 } 71 }
72 72
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 m_scriptLoader = nullptr; 106 m_scriptLoader = nullptr;
107 } 107 }
108 108
109 DEFINE_TRACE(InProcessWorkerBase) 109 DEFINE_TRACE(InProcessWorkerBase)
110 { 110 {
111 visitor->trace(m_contentSecurityPolicy); 111 visitor->trace(m_contentSecurityPolicy);
112 AbstractWorker::trace(visitor); 112 AbstractWorker::trace(visitor);
113 } 113 }
114 114
115 } // namespace blink 115 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698