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

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

Issue 2171563002: Add WorkerSettings to expose certain flag values in WorkerGlobalScope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 4 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 /* 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include <memory> 44 #include <memory>
45 45
46 namespace blink { 46 namespace blink {
47 47
48 DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::create(DedicatedWorkerTh read* thread, std::unique_ptr<WorkerThreadStartupData> startupData, double timeO rigin) 48 DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::create(DedicatedWorkerTh read* thread, std::unique_ptr<WorkerThreadStartupData> startupData, double timeO rigin)
49 { 49 {
50 // Note: startupData is finalized on return. After the relevant parts has be en 50 // Note: startupData is finalized on return. After the relevant parts has be en
51 // passed along to the created 'context'. 51 // passed along to the created 'context'.
52 DedicatedWorkerGlobalScope* context = new DedicatedWorkerGlobalScope(startup Data->m_scriptURL, startupData->m_userAgent, thread, timeOrigin, std::move(start upData->m_starterOriginPrivilegeData), startupData->m_workerClients.release()); 52 DedicatedWorkerGlobalScope* context = new DedicatedWorkerGlobalScope(startup Data->m_scriptURL, startupData->m_userAgent, thread, timeOrigin, std::move(start upData->m_starterOriginPrivilegeData), startupData->m_workerClients.release());
53 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit yPolicyHeaders); 53 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit yPolicyHeaders);
54 context->setWorkerSettings(std::move(startupData->m_workerSettings));
54 if (!startupData->m_referrerPolicy.isNull()) 55 if (!startupData->m_referrerPolicy.isNull())
55 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy); 56 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy);
56 context->setAddressSpace(startupData->m_addressSpace); 57 context->setAddressSpace(startupData->m_addressSpace);
57 OriginTrialContext::addTokens(context, startupData->m_originTrialTokens.get( )); 58 OriginTrialContext::addTokens(context, startupData->m_originTrialTokens.get( ));
58 return context; 59 return context;
59 } 60 }
60 61
61 DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const KURL& url, const St ring& userAgent, DedicatedWorkerThread* thread, double timeOrigin, std::unique_p tr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* wor kerClients) 62 DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const KURL& url, const St ring& userAgent, DedicatedWorkerThread* thread, double timeOrigin, std::unique_p tr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* wor kerClients)
62 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, std::move(starterOri ginPrivilegeData), workerClients) 63 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, std::move(starterOri ginPrivilegeData), workerClients)
63 { 64 {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 { 108 {
108 thread()->workerObjectProxy().postTaskToMainExecutionContext(createCrossThre adTask(&countDeprecationOnDocument, feature)); 109 thread()->workerObjectProxy().postTaskToMainExecutionContext(createCrossThre adTask(&countDeprecationOnDocument, feature));
109 } 110 }
110 111
111 DEFINE_TRACE(DedicatedWorkerGlobalScope) 112 DEFINE_TRACE(DedicatedWorkerGlobalScope)
112 { 113 {
113 WorkerGlobalScope::trace(visitor); 114 WorkerGlobalScope::trace(visitor);
114 } 115 }
115 116
116 } // namespace blink 117 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698