| 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 25 matching lines...) Expand all Loading... |
| 36 #include <memory> | 36 #include <memory> |
| 37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 38 #include "public/platform/WebContentSecurityPolicy.h" | 38 #include "public/platform/WebContentSecurityPolicy.h" |
| 39 #include "public/web/WebDevToolsAgentClient.h" | 39 #include "public/web/WebDevToolsAgentClient.h" |
| 40 #include "public/web/WebEmbeddedWorker.h" | 40 #include "public/web/WebEmbeddedWorker.h" |
| 41 #include "public/web/WebEmbeddedWorkerStartData.h" | 41 #include "public/web/WebEmbeddedWorkerStartData.h" |
| 42 #include "public/web/WebFrameClient.h" | 42 #include "public/web/WebFrameClient.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class ParentFrameTaskRunners; | |
| 47 class ServiceWorkerGlobalScopeProxy; | 46 class ServiceWorkerGlobalScopeProxy; |
| 48 class WebLocalFrameImpl; | 47 class WebLocalFrameImpl; |
| 49 class WebServiceWorkerNetworkProvider; | 48 class WebServiceWorkerNetworkProvider; |
| 50 class WebView; | 49 class WebView; |
| 51 class WorkerInspectorProxy; | 50 class WorkerInspectorProxy; |
| 52 class WorkerScriptLoader; | 51 class WorkerScriptLoader; |
| 53 class WorkerThread; | 52 class WorkerThread; |
| 54 | 53 |
| 55 class WebEmbeddedWorkerImpl final : public WebEmbeddedWorker, | 54 class WebEmbeddedWorkerImpl final : public WebEmbeddedWorker, |
| 56 public WebFrameClient, | 55 public WebFrameClient, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // to WorkerContext. | 115 // to WorkerContext. |
| 117 std::unique_ptr<WebWorkerContentSettingsClientProxy> m_contentSettingsClient; | 116 std::unique_ptr<WebWorkerContentSettingsClientProxy> m_contentSettingsClient; |
| 118 | 117 |
| 119 // We retain ownership of this one which is for use on the | 118 // We retain ownership of this one which is for use on the |
| 120 // main thread only. | 119 // main thread only. |
| 121 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; | 120 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; |
| 122 | 121 |
| 123 // Kept around only while main script loading is ongoing. | 122 // Kept around only while main script loading is ongoing. |
| 124 RefPtr<WorkerScriptLoader> m_mainScriptLoader; | 123 RefPtr<WorkerScriptLoader> m_mainScriptLoader; |
| 125 | 124 |
| 126 // Owned by the main thread, but will be accessed by the worker when | |
| 127 // posting tasks. | |
| 128 CrossThreadPersistent<ParentFrameTaskRunners> m_mainThreadTaskRunners; | |
| 129 | |
| 130 std::unique_ptr<WorkerThread> m_workerThread; | 125 std::unique_ptr<WorkerThread> m_workerThread; |
| 131 RefPtr<WorkerLoaderProxy> m_loaderProxy; | 126 RefPtr<WorkerLoaderProxy> m_loaderProxy; |
| 132 Persistent<ServiceWorkerGlobalScopeProxy> m_workerGlobalScopeProxy; | 127 Persistent<ServiceWorkerGlobalScopeProxy> m_workerGlobalScopeProxy; |
| 133 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; | 128 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; |
| 134 | 129 |
| 135 // 'shadow page' - created to proxy loading requests from the worker. | 130 // 'shadow page' - created to proxy loading requests from the worker. |
| 136 // Both WebView and WebFrame objects are close()'ed (where they're | 131 // Both WebView and WebFrame objects are close()'ed (where they're |
| 137 // deref'ed) when this EmbeddedWorkerImpl is destructed, therefore they | 132 // deref'ed) when this EmbeddedWorkerImpl is destructed, therefore they |
| 138 // are guaranteed to exist while this object is around. | 133 // are guaranteed to exist while this object is around. |
| 139 WebView* m_webView; | 134 WebView* m_webView; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 150 DoPauseAfterDownload, | 145 DoPauseAfterDownload, |
| 151 IsPausedAfterDownload | 146 IsPausedAfterDownload |
| 152 } m_pauseAfterDownloadState; | 147 } m_pauseAfterDownloadState; |
| 153 | 148 |
| 154 WaitingForDebuggerState m_waitingForDebuggerState; | 149 WaitingForDebuggerState m_waitingForDebuggerState; |
| 155 }; | 150 }; |
| 156 | 151 |
| 157 } // namespace blink | 152 } // namespace blink |
| 158 | 153 |
| 159 #endif // WebEmbeddedWorkerImpl_h | 154 #endif // WebEmbeddedWorkerImpl_h |
| OLD | NEW |