| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 void connectTask(WebMessagePortChannelUniquePtr); | 144 void connectTask(WebMessagePortChannelUniquePtr); |
| 145 | 145 |
| 146 // Tasks that are run on the main thread. | 146 // Tasks that are run on the main thread. |
| 147 void didCloseWorkerGlobalScopeOnMainThread(); | 147 void didCloseWorkerGlobalScopeOnMainThread(); |
| 148 void didTerminateWorkerThreadOnMainThread(); | 148 void didTerminateWorkerThreadOnMainThread(); |
| 149 | 149 |
| 150 void postMessageToPageInspectorOnMainThread(const String& message); | 150 void postMessageToPageInspectorOnMainThread(const String& message); |
| 151 | 151 |
| 152 // WorkerLoaderProxyProvider | 152 // WorkerLoaderProxyProvider |
| 153 void postTaskToLoader(const WebTraceLocation&, | 153 void postTaskToLoader(const WebTraceLocation&, |
| 154 std::unique_ptr<ExecutionContextTask>) override; | 154 std::unique_ptr<WTF::CrossThreadClosure>) override; |
| 155 void postTaskToWorkerGlobalScope( | 155 void postTaskToWorkerGlobalScope( |
| 156 const WebTraceLocation&, | 156 const WebTraceLocation&, |
| 157 std::unique_ptr<WTF::CrossThreadClosure>) override; | 157 std::unique_ptr<WTF::CrossThreadClosure>) override; |
| 158 ExecutionContext* getLoaderExecutionContext() override; |
| 158 | 159 |
| 159 // 'shadow page' - created to proxy loading requests from the worker. | 160 // 'shadow page' - created to proxy loading requests from the worker. |
| 160 // Will be accessed by worker thread when posting tasks. | 161 // Will be accessed by worker thread when posting tasks. |
| 161 // | 162 Persistent<ExecutionContext> m_loadingDocument; |
| 162 // TODO: it is undesirable to keep a cross-thread reference to this | |
| 163 // document; avoid reaching into the document when posting. | |
| 164 CrossThreadPersistent<ExecutionContext> m_loadingDocument; | |
| 165 WebView* m_webView; | 163 WebView* m_webView; |
| 166 Persistent<WebLocalFrameImpl> m_mainFrame; | 164 Persistent<WebLocalFrameImpl> m_mainFrame; |
| 167 bool m_askedToTerminate; | 165 bool m_askedToTerminate; |
| 168 | 166 |
| 169 // This one is bound to and used only on the main thread. | 167 // This one is bound to and used only on the main thread. |
| 170 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; | 168 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; |
| 171 | 169 |
| 172 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; | 170 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; |
| 173 | 171 |
| 174 // Owned by the main thread, but will be accessed by the worker. | 172 // Owned by the main thread, but will be accessed by the worker. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 187 RefPtr<WorkerLoaderProxy> m_loaderProxy; | 185 RefPtr<WorkerLoaderProxy> m_loaderProxy; |
| 188 | 186 |
| 189 WebURL m_url; | 187 WebURL m_url; |
| 190 WebString m_name; | 188 WebString m_name; |
| 191 WebAddressSpace m_creationAddressSpace; | 189 WebAddressSpace m_creationAddressSpace; |
| 192 }; | 190 }; |
| 193 | 191 |
| 194 } // namespace blink | 192 } // namespace blink |
| 195 | 193 |
| 196 #endif // WebSharedWorkerImpl_h | 194 #endif // WebSharedWorkerImpl_h |
| OLD | NEW |