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 18 matching lines...) Expand all Loading... |
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/Worker.h" | 36 #include "core/workers/Worker.h" |
37 #include "core/workers/WorkerClients.h" | 37 #include "core/workers/WorkerClients.h" |
38 #include "core/workers/WorkerMessagingProxy.h" | 38 #include "core/workers/WorkerMessagingProxy.h" |
39 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" | |
40 #include "public/platform/WebServiceWorkerProvider.h" | |
41 #include "public/platform/WebString.h" | 39 #include "public/platform/WebString.h" |
42 #include "public/web/WebFrameClient.h" | 40 #include "public/web/WebFrameClient.h" |
43 #include "public/web/WebPermissionClient.h" | 41 #include "public/web/WebPermissionClient.h" |
44 #include "public/web/WebWorkerPermissionClientProxy.h" | 42 #include "public/web/WebWorkerPermissionClientProxy.h" |
45 #include "web/LocalFileSystemClient.h" | 43 #include "web/LocalFileSystemClient.h" |
46 #include "web/WebLocalFrameImpl.h" | 44 #include "web/WebLocalFrameImpl.h" |
47 #include "web/WebViewImpl.h" | 45 #include "web/WebViewImpl.h" |
48 #include "web/WorkerPermissionClient.h" | 46 #include "web/WorkerPermissionClient.h" |
49 | 47 |
50 namespace blink { | 48 namespace blink { |
51 | 49 |
52 WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerGlobalSc
opeProxy(Worker* worker) | 50 WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerGlobalSc
opeProxy(Worker* worker) |
53 { | 51 { |
54 if (worker->executionContext()->isDocument()) { | 52 if (worker->executionContext()->isDocument()) { |
55 Document* document = toDocument(worker->executionContext()); | 53 Document* document = toDocument(worker->executionContext()); |
56 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->fra
me()); | 54 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->fra
me()); |
57 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); | 55 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); |
58 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); | 56 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); |
59 providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->
client()->createWorkerPermissionClientProxy(webFrame))); | 57 providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->
client()->createWorkerPermissionClientProxy(webFrame))); |
60 provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPt
r(webFrame->client()->createServiceWorkerProvider(webFrame))); | 58 // FIXME: call provideServiceWorkerContainerClientToWorker here when we |
| 59 // support ServiceWorker in dedicated workers (http://crbug.com/371690) |
61 return new WorkerMessagingProxy(worker, workerClients.release()); | 60 return new WorkerMessagingProxy(worker, workerClients.release()); |
62 } | 61 } |
63 ASSERT_NOT_REACHED(); | 62 ASSERT_NOT_REACHED(); |
64 return 0; | 63 return 0; |
65 } | 64 } |
66 | 65 |
67 } // namespace blink | 66 } // namespace blink |
OLD | NEW |