| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 , public WebFrameClient | 69 , public WebFrameClient |
| 70 , public WebSharedWorker | 70 , public WebSharedWorker |
| 71 , public WebDevToolsAgentClient | 71 , public WebDevToolsAgentClient |
| 72 , private WorkerLoaderProxyProvider { | 72 , private WorkerLoaderProxyProvider { |
| 73 public: | 73 public: |
| 74 explicit WebSharedWorkerImpl(WebSharedWorkerClient*); | 74 explicit WebSharedWorkerImpl(WebSharedWorkerClient*); |
| 75 | 75 |
| 76 // WorkerReportingProxy methods: | 76 // WorkerReportingProxy methods: |
| 77 void reportException( | 77 void reportException( |
| 78 const WTF::String&, int, int, const WTF::String&, int) override; | 78 const WTF::String&, int, int, const WTF::String&, int) override; |
| 79 void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) override; | 79 void reportConsoleMessage(RawPtr<ConsoleMessage>) override; |
| 80 void postMessageToPageInspector(const WTF::String&) override; | 80 void postMessageToPageInspector(const WTF::String&) override; |
| 81 void postWorkerConsoleAgentEnabled() override { } | 81 void postWorkerConsoleAgentEnabled() override { } |
| 82 void didEvaluateWorkerScript(bool success) override { } | 82 void didEvaluateWorkerScript(bool success) override { } |
| 83 void workerGlobalScopeStarted(WorkerGlobalScope*) override; | 83 void workerGlobalScopeStarted(WorkerGlobalScope*) override; |
| 84 void workerGlobalScopeClosed() override; | 84 void workerGlobalScopeClosed() override; |
| 85 void workerThreadTerminated() override; | 85 void workerThreadTerminated() override; |
| 86 void willDestroyWorkerGlobalScope() override { } | 86 void willDestroyWorkerGlobalScope() override { } |
| 87 | 87 |
| 88 // WebFrameClient methods to support resource loading thru the 'shadow page'
. | 88 // WebFrameClient methods to support resource loading thru the 'shadow page'
. |
| 89 WebApplicationCacheHost* createApplicationCacheHost(WebLocalFrame*, WebAppli
cationCacheHostClient*) override; | 89 WebApplicationCacheHost* createApplicationCacheHost(WebLocalFrame*, WebAppli
cationCacheHostClient*) override; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 void workerGlobalScopeClosedOnMainThread(); | 128 void workerGlobalScopeClosedOnMainThread(); |
| 129 void workerThreadTerminatedOnMainThread(); | 129 void workerThreadTerminatedOnMainThread(); |
| 130 | 130 |
| 131 void postMessageToPageInspectorOnMainThread(const String& message); | 131 void postMessageToPageInspectorOnMainThread(const String& message); |
| 132 | 132 |
| 133 // WorkerLoaderProxyProvider | 133 // WorkerLoaderProxyProvider |
| 134 void postTaskToLoader(PassOwnPtr<ExecutionContextTask>); | 134 void postTaskToLoader(PassOwnPtr<ExecutionContextTask>); |
| 135 bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>); | 135 bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>); |
| 136 | 136 |
| 137 // 'shadow page' - created to proxy loading requests from the worker. | 137 // 'shadow page' - created to proxy loading requests from the worker. |
| 138 RefPtrWillBePersistent<ExecutionContext> m_loadingDocument; | 138 Persistent<ExecutionContext> m_loadingDocument; |
| 139 WebView* m_webView; | 139 WebView* m_webView; |
| 140 RefPtrWillBePersistent<WebLocalFrameImpl> m_mainFrame; | 140 Persistent<WebLocalFrameImpl> m_mainFrame; |
| 141 bool m_askedToTerminate; | 141 bool m_askedToTerminate; |
| 142 | 142 |
| 143 // This one is bound to and used only on the main thread. | 143 // This one is bound to and used only on the main thread. |
| 144 OwnPtr<WebServiceWorkerNetworkProvider> m_networkProvider; | 144 OwnPtr<WebServiceWorkerNetworkProvider> m_networkProvider; |
| 145 | 145 |
| 146 OwnPtrWillBePersistent<WorkerInspectorProxy> m_workerInspectorProxy; | 146 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; |
| 147 | 147 |
| 148 RefPtr<WorkerThread> m_workerThread; | 148 RefPtr<WorkerThread> m_workerThread; |
| 149 | 149 |
| 150 WebSharedWorkerClient* m_client; | 150 WebSharedWorkerClient* m_client; |
| 151 | 151 |
| 152 bool m_pauseWorkerContextOnStart; | 152 bool m_pauseWorkerContextOnStart; |
| 153 bool m_isPausedOnStart; | 153 bool m_isPausedOnStart; |
| 154 | 154 |
| 155 // Kept around only while main script loading is ongoing. | 155 // Kept around only while main script loading is ongoing. |
| 156 RefPtr<WorkerScriptLoader> m_mainScriptLoader; | 156 RefPtr<WorkerScriptLoader> m_mainScriptLoader; |
| 157 | 157 |
| 158 RefPtr<WorkerLoaderProxy> m_loaderProxy; | 158 RefPtr<WorkerLoaderProxy> m_loaderProxy; |
| 159 | 159 |
| 160 WebURL m_url; | 160 WebURL m_url; |
| 161 WebString m_name; | 161 WebString m_name; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 } // namespace blink | 164 } // namespace blink |
| 165 | 165 |
| 166 #endif // WebSharedWorkerImpl_h | 166 #endif // WebSharedWorkerImpl_h |
| OLD | NEW |