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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "WorkerGlobalScopeProxyProviderImpl.h" | 32 #include "WorkerGlobalScopeProxyProviderImpl.h" |
33 | 33 |
34 #include "DatabaseClientImpl.h" | 34 #include "DatabaseClientImpl.h" |
35 #include "LocalFileSystemClient.h" | 35 #include "LocalFileSystemClient.h" |
36 #include "WebFrameImpl.h" | 36 #include "WebLocalFrameImpl.h" |
37 #include "WebPermissionClient.h" | 37 #include "WebPermissionClient.h" |
38 #include "WebViewImpl.h" | 38 #include "WebViewImpl.h" |
39 #include "WorkerPermissionClient.h" | 39 #include "WorkerPermissionClient.h" |
40 #include "core/dom/Document.h" | 40 #include "core/dom/Document.h" |
41 #include "core/inspector/ScriptCallStack.h" | 41 #include "core/inspector/ScriptCallStack.h" |
42 #include "core/workers/Worker.h" | 42 #include "core/workers/Worker.h" |
43 #include "core/workers/WorkerClients.h" | 43 #include "core/workers/WorkerClients.h" |
44 #include "core/workers/WorkerMessagingProxy.h" | 44 #include "core/workers/WorkerMessagingProxy.h" |
45 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" | 45 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" |
46 #include "public/platform/WebServiceWorkerProvider.h" | 46 #include "public/platform/WebServiceWorkerProvider.h" |
47 #include "public/platform/WebString.h" | 47 #include "public/platform/WebString.h" |
48 #include "public/web/WebFrameClient.h" | 48 #include "public/web/WebFrameClient.h" |
49 #include "public/web/WebWorkerPermissionClientProxy.h" | 49 #include "public/web/WebWorkerPermissionClientProxy.h" |
50 | 50 |
51 using namespace WebCore; | 51 using namespace WebCore; |
52 | 52 |
53 namespace blink { | 53 namespace blink { |
54 | 54 |
55 WebCore::WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorke
rGlobalScopeProxy(Worker* worker) | 55 WebCore::WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorke
rGlobalScopeProxy(Worker* worker) |
56 { | 56 { |
57 if (worker->executionContext()->isDocument()) { | 57 if (worker->executionContext()->isDocument()) { |
58 Document* document = toDocument(worker->executionContext()); | 58 Document* document = toDocument(worker->executionContext()); |
59 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); | 59 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->fra
me()); |
60 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); | 60 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); |
61 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); | 61 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); |
62 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::c
reate()); | 62 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::c
reate()); |
63 providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->
client()->createWorkerPermissionClientProxy(webFrame))); | 63 providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->
client()->createWorkerPermissionClientProxy(webFrame))); |
64 provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPt
r(webFrame->client()->createServiceWorkerProvider(webFrame))); | 64 provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPt
r(webFrame->client()->createServiceWorkerProvider(webFrame))); |
65 return new WorkerMessagingProxy(worker, workerClients.release()); | 65 return new WorkerMessagingProxy(worker, workerClients.release()); |
66 } | 66 } |
67 ASSERT_NOT_REACHED(); | 67 ASSERT_NOT_REACHED(); |
68 return 0; | 68 return 0; |
69 } | 69 } |
70 | 70 |
71 } // namespace blink | 71 } // namespace blink |
OLD | NEW |