| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GLUE_WEBWORKER_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBWORKER_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBWORKER_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBWORKER_IMPL_H_ |
| 7 | 7 |
| 8 #include "webkit/api/public/WebWorker.h" | 8 #include "webkit/api/public/WebWorker.h" |
| 9 | 9 |
| 10 #if ENABLE(WORKERS) | 10 #if ENABLE(WORKERS) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // WebWorker methods: | 62 // WebWorker methods: |
| 63 virtual void startWorkerContext(const WebKit::WebURL& script_url, | 63 virtual void startWorkerContext(const WebKit::WebURL& script_url, |
| 64 const WebKit::WebString& user_agent, | 64 const WebKit::WebString& user_agent, |
| 65 const WebKit::WebString& source_code); | 65 const WebKit::WebString& source_code); |
| 66 virtual void terminateWorkerContext(); | 66 virtual void terminateWorkerContext(); |
| 67 virtual void postMessageToWorkerContext( | 67 virtual void postMessageToWorkerContext( |
| 68 const WebKit::WebString& message, | 68 const WebKit::WebString& message, |
| 69 const WebKit::WebMessagePortChannelArray& channel); | 69 const WebKit::WebMessagePortChannelArray& channel); |
| 70 virtual void workerObjectDestroyed(); | 70 virtual void workerObjectDestroyed(); |
| 71 virtual void clientDestroyed(); |
| 71 | 72 |
| 72 WebKit::WebWorkerClient* client() { return client_; } | 73 WebKit::WebWorkerClient* client() { return client_; } |
| 73 | 74 |
| 74 // Executes the given task on the main thread. | 75 // Executes the given task on the main thread. |
| 75 static void DispatchTaskToMainThread( | 76 static void DispatchTaskToMainThread( |
| 76 PassRefPtr<WebCore::ScriptExecutionContext::Task> task); | 77 PassRefPtr<WebCore::ScriptExecutionContext::Task> task); |
| 77 | 78 |
| 78 private: | 79 private: |
| 79 virtual ~WebWorkerImpl(); | 80 virtual ~WebWorkerImpl(); |
| 80 | 81 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 bool asked_to_terminate_; | 131 bool asked_to_terminate_; |
| 131 | 132 |
| 132 WTF::RefPtr<WebCore::WorkerThread> worker_thread_; | 133 WTF::RefPtr<WebCore::WorkerThread> worker_thread_; |
| 133 | 134 |
| 134 DISALLOW_COPY_AND_ASSIGN(WebWorkerImpl); | 135 DISALLOW_COPY_AND_ASSIGN(WebWorkerImpl); |
| 135 }; | 136 }; |
| 136 | 137 |
| 137 #endif | 138 #endif |
| 138 | 139 |
| 139 #endif // WEBKIT_GLUE_WEBWORKER_IMPL_H_ | 140 #endif // WEBKIT_GLUE_WEBWORKER_IMPL_H_ |
| OLD | NEW |