OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "core/frame/UseCounter.h" | 37 #include "core/frame/UseCounter.h" |
38 #include "core/frame/csp/ContentSecurityPolicy.h" | 38 #include "core/frame/csp/ContentSecurityPolicy.h" |
39 #include "core/origin_trials/OriginTrialContext.h" | 39 #include "core/origin_trials/OriginTrialContext.h" |
40 #include "core/workers/DedicatedWorkerThread.h" | 40 #include "core/workers/DedicatedWorkerThread.h" |
41 #include "core/workers/InProcessWorkerObjectProxy.h" | 41 #include "core/workers/InProcessWorkerObjectProxy.h" |
42 #include "core/workers/WorkerClients.h" | 42 #include "core/workers/WorkerClients.h" |
43 #include "core/workers/WorkerThreadStartupData.h" | 43 #include "core/workers/WorkerThreadStartupData.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::create(DedicatedWorkerTh
read* thread, PassOwnPtr<WorkerThreadStartupData> startupData, double timeOrigin
) | 47 DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::create(DedicatedWorkerTh
read* thread, WorkerThreadStartupData* startupData, double timeOrigin) |
48 { | 48 { |
49 // Note: startupData is finalized on return. After the relevant parts has be
en | 49 // Note: startupData is finalized on return. After the relevant parts has be
en |
50 // passed along to the created 'context'. | 50 // passed along to the created 'context'. |
51 DedicatedWorkerGlobalScope* context = new DedicatedWorkerGlobalScope(startup
Data->m_scriptURL, startupData->m_userAgent, thread, timeOrigin, std::move(start
upData->m_starterOriginPrivilegeData), startupData->m_workerClients.release()); | 51 DedicatedWorkerGlobalScope* context = new DedicatedWorkerGlobalScope(startup
Data->m_scriptURL, startupData->m_userAgent, thread, timeOrigin, std::move(start
upData->m_starterOriginPrivilegeData), startupData->m_workerClients.release()); |
52 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit
yPolicyHeaders); | 52 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit
yPolicyHeaders); |
53 context->setAddressSpace(startupData->m_addressSpace); | 53 context->setAddressSpace(startupData->m_addressSpace); |
54 OriginTrialContext::addTokens(context, startupData->m_originTrialTokens.get(
)); | 54 OriginTrialContext::addTokens(context, startupData->m_originTrialTokens.get(
)); |
55 return context; | 55 return context; |
56 } | 56 } |
57 | 57 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 { | 104 { |
105 thread()->workerObjectProxy().postTaskToMainExecutionContext(createCrossThre
adTask(&countDeprecationOnDocument, feature)); | 105 thread()->workerObjectProxy().postTaskToMainExecutionContext(createCrossThre
adTask(&countDeprecationOnDocument, feature)); |
106 } | 106 } |
107 | 107 |
108 DEFINE_TRACE(DedicatedWorkerGlobalScope) | 108 DEFINE_TRACE(DedicatedWorkerGlobalScope) |
109 { | 109 { |
110 WorkerGlobalScope::trace(visitor); | 110 WorkerGlobalScope::trace(visitor); |
111 } | 111 } |
112 | 112 |
113 } // namespace blink | 113 } // namespace blink |
OLD | NEW |