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 "web/WorkerGlobalScopeProxyProviderImpl.h" | 32 #include "web/WorkerGlobalScopeProxyProviderImpl.h" |
33 | 33 |
34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
35 #include "core/inspector/ScriptCallStack.h" | 35 #include "core/inspector/ScriptCallStack.h" |
| 36 #include "core/workers/DedicatedWorkerMessagingProxy.h" |
36 #include "core/workers/Worker.h" | 37 #include "core/workers/Worker.h" |
37 #include "core/workers/WorkerClients.h" | 38 #include "core/workers/WorkerClients.h" |
38 #include "core/workers/WorkerMessagingProxy.h" | |
39 #include "public/platform/WebString.h" | 39 #include "public/platform/WebString.h" |
40 #include "public/web/WebContentSettingsClient.h" | 40 #include "public/web/WebContentSettingsClient.h" |
41 #include "public/web/WebFrameClient.h" | 41 #include "public/web/WebFrameClient.h" |
42 #include "public/web/WebWorkerContentSettingsClientProxy.h" | 42 #include "public/web/WebWorkerContentSettingsClientProxy.h" |
43 #include "web/LocalFileSystemClient.h" | 43 #include "web/LocalFileSystemClient.h" |
44 #include "web/WebLocalFrameImpl.h" | 44 #include "web/WebLocalFrameImpl.h" |
45 #include "web/WebViewImpl.h" | 45 #include "web/WebViewImpl.h" |
46 #include "web/WorkerContentSettingsClient.h" | 46 #include "web/WorkerContentSettingsClient.h" |
47 | 47 |
48 namespace blink { | 48 namespace blink { |
49 | 49 |
50 WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerGlobalSc
opeProxy(Worker* worker) | 50 WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerGlobalSc
opeProxy(Worker* worker) |
51 { | 51 { |
52 if (worker->executionContext()->isDocument()) { | 52 if (worker->executionContext()->isDocument()) { |
53 Document* document = toDocument(worker->executionContext()); | 53 Document* document = toDocument(worker->executionContext()); |
54 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->fra
me()); | 54 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->fra
me()); |
55 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); | 55 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); |
56 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); | 56 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); |
57 provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(webFr
ame->client()->createWorkerContentSettingsClientProxy(webFrame))); | 57 provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(webFr
ame->client()->createWorkerContentSettingsClientProxy(webFrame))); |
58 // FIXME: call provideServiceWorkerContainerClientToWorker here when we | 58 // FIXME: call provideServiceWorkerContainerClientToWorker here when we |
59 // support ServiceWorker in dedicated workers (http://crbug.com/371690) | 59 // support ServiceWorker in dedicated workers (http://crbug.com/371690) |
60 return new WorkerMessagingProxy(worker, workerClients.release()); | 60 return new DedicatedWorkerMessagingProxy(worker, workerClients.release()
); |
61 } | 61 } |
62 ASSERT_NOT_REACHED(); | 62 ASSERT_NOT_REACHED(); |
63 return 0; | 63 return 0; |
64 } | 64 } |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
OLD | NEW |