This source file includes following definitions.
- createWorkerGlobalScopeProxy
#include "config.h"
#include "WorkerGlobalScopeProxyProviderImpl.h"
#include "DatabaseClientImpl.h"
#include "LocalFileSystemClient.h"
#include "WebFrameImpl.h"
#include "WebPermissionClient.h"
#include "WebViewImpl.h"
#include "WorkerPermissionClient.h"
#include "core/dom/Document.h"
#include "core/inspector/ScriptCallStack.h"
#include "core/workers/Worker.h"
#include "core/workers/WorkerClients.h"
#include "core/workers/WorkerMessagingProxy.h"
#include "modules/serviceworkers/ServiceWorkerContainerClient.h"
#include "public/platform/WebServiceWorkerProvider.h"
#include "public/platform/WebString.h"
#include "public/web/WebFrameClient.h"
#include "public/web/WebWorkerPermissionClientProxy.h"
using namespace WebCore;
namespace blink {
WebCore::WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerGlobalScopeProxy(Worker* worker)
{
if (worker->executionContext()->isDocument()) {
Document* document = toDocument(worker->executionContext());
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
OwnPtr<WorkerClients> workerClients = WorkerClients::create();
provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::create());
provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::create());
providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->client()->createWorkerPermissionClientProxy(webFrame)));
provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPtr(webFrame->client()->createServiceWorkerProvider(webFrame)));
return new WorkerMessagingProxy(worker, workerClients.release());
}
ASSERT_NOT_REACHED();
return 0;
}
}