| Index: third_party/WebKit/Source/modules/ModulesInitializer.cpp
|
| diff --git a/third_party/WebKit/Source/modules/ModulesInitializer.cpp b/third_party/WebKit/Source/modules/ModulesInitializer.cpp
|
| index f8919e3b6385ac84c461ebf76e2bbbaa337f6d35..d13729ae6e1f5b998915f9519aafa007dc31d5e4 100644
|
| --- a/third_party/WebKit/Source/modules/ModulesInitializer.cpp
|
| +++ b/third_party/WebKit/Source/modules/ModulesInitializer.cpp
|
| @@ -15,6 +15,8 @@
|
| #include "core/html/HTMLMediaElement.h"
|
| #include "core/offscreencanvas/OffscreenCanvas.h"
|
| #include "core/page/ChromeClient.h"
|
| +#include "core/workers/Worker.h"
|
| +#include "core/workers/WorkerClients.h"
|
| #include "core/workers/WorkerContentSettingsClient.h"
|
| #include "modules/EventModulesFactory.h"
|
| #include "modules/EventModulesNames.h"
|
| @@ -28,6 +30,7 @@
|
| #include "modules/compositorworker/CompositorWorkerThread.h"
|
| #include "modules/csspaint/CSSPaintImageGeneratorImpl.h"
|
| #include "modules/document_metadata/CopylessPasteServer.h"
|
| +#include "modules/exported/WebEmbeddedWorkerImpl.h"
|
| #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h"
|
| #include "modules/filesystem/LocalFileSystemClient.h"
|
| #include "modules/imagebitmap/ImageBitmapRenderingContext.h"
|
| @@ -140,10 +143,8 @@ void ModulesInitializer::Initialize() {
|
| InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher());
|
| });
|
|
|
| - // WebSharedWorkerImpl callbacks for modules initialization.
|
| - // TODO(nhiroki): Implement a common mechanism to set up WorkerClients
|
| - // (https://crbug.com/729500).
|
| - WebSharedWorkerImpl::RegisterWorkerClientsCreatedCallback(
|
| + // DedicatedWorker callbacks for modules initialization.
|
| + WorkerClientsInitializer<Worker>::Register(
|
| [](WorkerClients* worker_clients) {
|
| ProvideLocalFileSystemToWorker(worker_clients,
|
| LocalFileSystemClient::Create());
|
| @@ -151,6 +152,22 @@ void ModulesInitializer::Initialize() {
|
| worker_clients, IndexedDBClientImpl::Create(*worker_clients));
|
| });
|
|
|
| + // SharedWorker callbacks for modules initialization.
|
| + WorkerClientsInitializer<WebSharedWorkerImpl>::Register(
|
| + [](WorkerClients* worker_clients) {
|
| + ProvideLocalFileSystemToWorker(worker_clients,
|
| + LocalFileSystemClient::Create());
|
| + ProvideIndexedDBClientToWorker(
|
| + worker_clients, IndexedDBClientImpl::Create(*worker_clients));
|
| + });
|
| +
|
| + // ServiceWorker callbacks for modules initialization.
|
| + WorkerClientsInitializer<WebEmbeddedWorkerImpl>::Register(
|
| + [](WorkerClients* worker_clients) {
|
| + ProvideIndexedDBClientToWorker(
|
| + worker_clients, IndexedDBClientImpl::Create(*worker_clients));
|
| + });
|
| +
|
| HTMLMediaElement::RegisterMediaControlsFactory(
|
| WTF::MakeUnique<MediaControlsImpl::Factory>());
|
|
|
|
|