| 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 30 matching lines...) Expand all Loading... |
| 41 #include "public/platform/WebString.h" | 41 #include "public/platform/WebString.h" |
| 42 #include "public/web/WebFrameClient.h" | 42 #include "public/web/WebFrameClient.h" |
| 43 #include "public/web/WebPermissionClient.h" | 43 #include "public/web/WebPermissionClient.h" |
| 44 #include "public/web/WebWorkerPermissionClientProxy.h" | 44 #include "public/web/WebWorkerPermissionClientProxy.h" |
| 45 #include "web/DatabaseClientImpl.h" | 45 #include "web/DatabaseClientImpl.h" |
| 46 #include "web/LocalFileSystemClient.h" | 46 #include "web/LocalFileSystemClient.h" |
| 47 #include "web/WebLocalFrameImpl.h" | 47 #include "web/WebLocalFrameImpl.h" |
| 48 #include "web/WebViewImpl.h" | 48 #include "web/WebViewImpl.h" |
| 49 #include "web/WorkerPermissionClient.h" | 49 #include "web/WorkerPermissionClient.h" |
| 50 | 50 |
| 51 using namespace blink; | |
| 52 | |
| 53 namespace blink { | 51 namespace blink { |
| 54 | 52 |
| 55 blink::WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerG
lobalScopeProxy(Worker* worker) | 53 WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerGlobalSc
opeProxy(Worker* worker) |
| 56 { | 54 { |
| 57 if (worker->executionContext()->isDocument()) { | 55 if (worker->executionContext()->isDocument()) { |
| 58 Document* document = toDocument(worker->executionContext()); | 56 Document* document = toDocument(worker->executionContext()); |
| 59 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->fra
me()); | 57 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->fra
me()); |
| 60 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); | 58 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(
); |
| 61 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); | 59 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClien
t::create()); |
| 62 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::c
reate()); | 60 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::c
reate()); |
| 63 providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->
client()->createWorkerPermissionClientProxy(webFrame))); | 61 providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->
client()->createWorkerPermissionClientProxy(webFrame))); |
| 64 provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPt
r(webFrame->client()->createServiceWorkerProvider(webFrame))); | 62 provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPt
r(webFrame->client()->createServiceWorkerProvider(webFrame))); |
| 65 return new WorkerMessagingProxy(worker, workerClients.release()); | 63 return new WorkerMessagingProxy(worker, workerClients.release()); |
| 66 } | 64 } |
| 67 ASSERT_NOT_REACHED(); | 65 ASSERT_NOT_REACHED(); |
| 68 return 0; | 66 return 0; |
| 69 } | 67 } |
| 70 | 68 |
| 71 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |