| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 #ifndef WebEmbeddedWorkerImpl_h | 31 #ifndef WebEmbeddedWorkerImpl_h |
| 32 #define WebEmbeddedWorkerImpl_h | 32 #define WebEmbeddedWorkerImpl_h |
| 33 | 33 |
| 34 #include "core/workers/WorkerLoaderProxy.h" | 34 #include "core/workers/WorkerLoaderProxy.h" |
| 35 | 35 |
| 36 #include "platform/heap/Handle.h" |
| 36 #include "public/web/WebContentSecurityPolicy.h" | 37 #include "public/web/WebContentSecurityPolicy.h" |
| 37 #include "public/web/WebDevToolsAgentClient.h" | 38 #include "public/web/WebDevToolsAgentClient.h" |
| 38 #include "public/web/WebEmbeddedWorker.h" | 39 #include "public/web/WebEmbeddedWorker.h" |
| 39 #include "public/web/WebEmbeddedWorkerStartData.h" | 40 #include "public/web/WebEmbeddedWorkerStartData.h" |
| 40 #include "public/web/WebFrameClient.h" | 41 #include "public/web/WebFrameClient.h" |
| 41 #include <memory> | 42 #include <memory> |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 | 45 |
| 46 class ParentFrameTaskRunners; |
| 45 class ServiceWorkerGlobalScopeProxy; | 47 class ServiceWorkerGlobalScopeProxy; |
| 46 class WebLocalFrameImpl; | 48 class WebLocalFrameImpl; |
| 47 class WebServiceWorkerNetworkProvider; | 49 class WebServiceWorkerNetworkProvider; |
| 48 class WebView; | 50 class WebView; |
| 49 class WorkerInspectorProxy; | 51 class WorkerInspectorProxy; |
| 50 class WorkerScriptLoader; | 52 class WorkerScriptLoader; |
| 51 class WorkerThread; | 53 class WorkerThread; |
| 52 | 54 |
| 53 class WebEmbeddedWorkerImpl final | 55 class WebEmbeddedWorkerImpl final |
| 54 : public WebEmbeddedWorker | 56 : public WebEmbeddedWorker |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // to WorkerContext. | 104 // to WorkerContext. |
| 103 std::unique_ptr<WebWorkerContentSettingsClientProxy> m_contentSettingsClient
; | 105 std::unique_ptr<WebWorkerContentSettingsClientProxy> m_contentSettingsClient
; |
| 104 | 106 |
| 105 // We retain ownership of this one which is for use on the | 107 // We retain ownership of this one which is for use on the |
| 106 // main thread only. | 108 // main thread only. |
| 107 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; | 109 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; |
| 108 | 110 |
| 109 // Kept around only while main script loading is ongoing. | 111 // Kept around only while main script loading is ongoing. |
| 110 RefPtr<WorkerScriptLoader> m_mainScriptLoader; | 112 RefPtr<WorkerScriptLoader> m_mainScriptLoader; |
| 111 | 113 |
| 114 Persistent<ParentFrameTaskRunners> m_mainThreadTaskRunners; |
| 115 |
| 112 std::unique_ptr<WorkerThread> m_workerThread; | 116 std::unique_ptr<WorkerThread> m_workerThread; |
| 113 RefPtr<WorkerLoaderProxy> m_loaderProxy; | 117 RefPtr<WorkerLoaderProxy> m_loaderProxy; |
| 114 Persistent<ServiceWorkerGlobalScopeProxy> m_workerGlobalScopeProxy; | 118 Persistent<ServiceWorkerGlobalScopeProxy> m_workerGlobalScopeProxy; |
| 115 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; | 119 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; |
| 116 | 120 |
| 117 // 'shadow page' - created to proxy loading requests from the worker. | 121 // 'shadow page' - created to proxy loading requests from the worker. |
| 118 // Both WebView and WebFrame objects are close()'ed (where they're | 122 // Both WebView and WebFrame objects are close()'ed (where they're |
| 119 // deref'ed) when this EmbeddedWorkerImpl is destructed, therefore they | 123 // deref'ed) when this EmbeddedWorkerImpl is destructed, therefore they |
| 120 // are guaranteed to exist while this object is around. | 124 // are guaranteed to exist while this object is around. |
| 121 WebView* m_webView; | 125 WebView* m_webView; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 134 DoPauseAfterDownload, | 138 DoPauseAfterDownload, |
| 135 IsPausedAfterDownload | 139 IsPausedAfterDownload |
| 136 } m_pauseAfterDownloadState; | 140 } m_pauseAfterDownloadState; |
| 137 | 141 |
| 138 WaitingForDebuggerState m_waitingForDebuggerState; | 142 WaitingForDebuggerState m_waitingForDebuggerState; |
| 139 }; | 143 }; |
| 140 | 144 |
| 141 } // namespace blink | 145 } // namespace blink |
| 142 | 146 |
| 143 #endif // WebEmbeddedWorkerImpl_h | 147 #endif // WebEmbeddedWorkerImpl_h |
| OLD | NEW |