| 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 28 matching lines...) Expand all Loading... |
| 39 #include "core/loader/FrameLoadRequest.h" | 39 #include "core/loader/FrameLoadRequest.h" |
| 40 #include "core/loader/FrameLoader.h" | 40 #include "core/loader/FrameLoader.h" |
| 41 #include "core/page/Page.h" | 41 #include "core/page/Page.h" |
| 42 #include "core/workers/SharedWorkerGlobalScope.h" | 42 #include "core/workers/SharedWorkerGlobalScope.h" |
| 43 #include "core/workers/SharedWorkerThread.h" | 43 #include "core/workers/SharedWorkerThread.h" |
| 44 #include "core/workers/WorkerClients.h" | 44 #include "core/workers/WorkerClients.h" |
| 45 #include "core/workers/WorkerGlobalScope.h" | 45 #include "core/workers/WorkerGlobalScope.h" |
| 46 #include "core/workers/WorkerInspectorProxy.h" | 46 #include "core/workers/WorkerInspectorProxy.h" |
| 47 #include "core/workers/WorkerLoaderProxy.h" | 47 #include "core/workers/WorkerLoaderProxy.h" |
| 48 #include "core/workers/WorkerScriptLoader.h" | 48 #include "core/workers/WorkerScriptLoader.h" |
| 49 #include "core/workers/WorkerSettings.h" |
| 49 #include "core/workers/WorkerThreadStartupData.h" | 50 #include "core/workers/WorkerThreadStartupData.h" |
| 50 #include "platform/CrossThreadFunctional.h" | 51 #include "platform/CrossThreadFunctional.h" |
| 51 #include "platform/RuntimeEnabledFeatures.h" | 52 #include "platform/RuntimeEnabledFeatures.h" |
| 52 #include "platform/heap/Handle.h" | 53 #include "platform/heap/Handle.h" |
| 53 #include "platform/network/ContentSecurityPolicyParsers.h" | 54 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 54 #include "platform/network/ResourceResponse.h" | 55 #include "platform/network/ResourceResponse.h" |
| 55 #include "platform/weborigin/KURL.h" | 56 #include "platform/weborigin/KURL.h" |
| 56 #include "platform/weborigin/SecurityOrigin.h" | 57 #include "platform/weborigin/SecurityOrigin.h" |
| 57 #include "public/platform/Platform.h" | 58 #include "public/platform/Platform.h" |
| 58 #include "public/platform/WebFileError.h" | 59 #include "public/platform/WebFileError.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 329 |
| 329 Document* document = m_mainFrame->frame()->document(); | 330 Document* document = m_mainFrame->frame()->document(); |
| 330 // FIXME: this document's origin is pristine and without any extra privilege
s. (crbug.com/254993) | 331 // FIXME: this document's origin is pristine and without any extra privilege
s. (crbug.com/254993) |
| 331 SecurityOrigin* starterOrigin = document->getSecurityOrigin(); | 332 SecurityOrigin* starterOrigin = document->getSecurityOrigin(); |
| 332 | 333 |
| 333 WorkerClients* workerClients = WorkerClients::create(); | 334 WorkerClients* workerClients = WorkerClients::create(); |
| 334 provideLocalFileSystemToWorker(workerClients, LocalFileSystemClient::create(
)); | 335 provideLocalFileSystemToWorker(workerClients, LocalFileSystemClient::create(
)); |
| 335 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->getSecurityOrigin()); | 336 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->getSecurityOrigin()); |
| 336 provideContentSettingsClientToWorker(workerClients, wrapUnique(m_client->cre
ateWorkerContentSettingsClientProxy(webSecurityOrigin))); | 337 provideContentSettingsClientToWorker(workerClients, wrapUnique(m_client->cre
ateWorkerContentSettingsClientProxy(webSecurityOrigin))); |
| 337 provideIndexedDBClientToWorker(workerClients, IndexedDBClientImpl::create())
; | 338 provideIndexedDBClientToWorker(workerClients, IndexedDBClientImpl::create())
; |
| 339 provideWorkerSettingsToWorker(workerClients, WorkerSettings::create(document
->settings())); |
| 338 ContentSecurityPolicy* contentSecurityPolicy = m_mainScriptLoader->releaseCo
ntentSecurityPolicy(); | 340 ContentSecurityPolicy* contentSecurityPolicy = m_mainScriptLoader->releaseCo
ntentSecurityPolicy(); |
| 339 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do
cument); | 341 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do
cument); |
| 340 std::unique_ptr<WorkerThreadStartupData> startupData = WorkerThreadStartupDa
ta::create( | 342 std::unique_ptr<WorkerThreadStartupData> startupData = WorkerThreadStartupDa
ta::create( |
| 341 m_url, | 343 m_url, |
| 342 m_loadingDocument->userAgent(), | 344 m_loadingDocument->userAgent(), |
| 343 m_mainScriptLoader->script(), | 345 m_mainScriptLoader->script(), |
| 344 nullptr, | 346 nullptr, |
| 345 startMode, | 347 startMode, |
| 346 contentSecurityPolicy ? contentSecurityPolicy->headers().get() : nullptr
, | 348 contentSecurityPolicy ? contentSecurityPolicy->headers().get() : nullptr
, |
| 347 m_mainScriptLoader->referrerPolicy(), | 349 m_mainScriptLoader->referrerPolicy(), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 if (devtoolsAgent) | 401 if (devtoolsAgent) |
| 400 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); | 402 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); |
| 401 } | 403 } |
| 402 | 404 |
| 403 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 405 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 404 { | 406 { |
| 405 return new WebSharedWorkerImpl(client); | 407 return new WebSharedWorkerImpl(client); |
| 406 } | 408 } |
| 407 | 409 |
| 408 } // namespace blink | 410 } // namespace blink |
| OLD | NEW |