OLD | NEW |
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 "modules/compositorworker/CompositorWorkerGlobalScope.h" | 5 #include "modules/compositorworker/CompositorWorkerGlobalScope.h" |
6 | 6 |
7 #include "bindings/core/v8/SerializedScriptValue.h" | 7 #include "bindings/core/v8/SerializedScriptValue.h" |
8 #include "core/workers/InProcessWorkerObjectProxy.h" | 8 #include "core/workers/InProcessWorkerObjectProxy.h" |
9 #include "core/workers/WorkerThreadStartupData.h" | 9 #include "core/workers/WorkerThreadStartupData.h" |
10 #include "modules/EventTargetModules.h" | 10 #include "modules/EventTargetModules.h" |
11 #include "modules/compositorworker/CompositorWorkerThread.h" | 11 #include "modules/compositorworker/CompositorWorkerThread.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 CompositorWorkerGlobalScope* CompositorWorkerGlobalScope::create(CompositorWorke
rThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData, double timeOri
gin) | 15 CompositorWorkerGlobalScope* CompositorWorkerGlobalScope::create(CompositorWorke
rThread* thread, WorkerThreadStartupData* startupData, double timeOrigin) |
16 { | 16 { |
17 // Note: startupData is finalized on return. After the relevant parts has be
en | 17 // Note: startupData is finalized on return. After the relevant parts has be
en |
18 // passed along to the created 'context'. | 18 // passed along to the created 'context'. |
19 CompositorWorkerGlobalScope* context = new CompositorWorkerGlobalScope(start
upData->m_scriptURL, startupData->m_userAgent, thread, timeOrigin, std::move(sta
rtupData->m_starterOriginPrivilegeData), startupData->m_workerClients.release())
; | 19 CompositorWorkerGlobalScope* context = new CompositorWorkerGlobalScope(start
upData->m_scriptURL, startupData->m_userAgent, thread, timeOrigin, std::move(sta
rtupData->m_starterOriginPrivilegeData), startupData->m_workerClients.release())
; |
20 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit
yPolicyHeaders); | 20 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit
yPolicyHeaders); |
21 context->setAddressSpace(startupData->m_addressSpace); | 21 context->setAddressSpace(startupData->m_addressSpace); |
22 return context; | 22 return context; |
23 } | 23 } |
24 | 24 |
25 CompositorWorkerGlobalScope::CompositorWorkerGlobalScope(const KURL& url, const
String& userAgent, CompositorWorkerThread* thread, double timeOrigin, PassOwnPtr
<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* worke
rClients) | 25 CompositorWorkerGlobalScope::CompositorWorkerGlobalScope(const KURL& url, const
String& userAgent, CompositorWorkerThread* thread, double timeOrigin, PassOwnPtr
<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* worke
rClients) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 m_callbackCollection.executeCallbacks(highResTimeMs, highResTimeMs); | 73 m_callbackCollection.executeCallbacks(highResTimeMs, highResTimeMs); |
74 return !m_callbackCollection.isEmpty(); | 74 return !m_callbackCollection.isEmpty(); |
75 } | 75 } |
76 | 76 |
77 CompositorWorkerThread* CompositorWorkerGlobalScope::thread() const | 77 CompositorWorkerThread* CompositorWorkerGlobalScope::thread() const |
78 { | 78 { |
79 return static_cast<CompositorWorkerThread*>(WorkerGlobalScope::thread()); | 79 return static_cast<CompositorWorkerThread*>(WorkerGlobalScope::thread()); |
80 } | 80 } |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
OLD | NEW |