| 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_WEBWORKERCLIENT_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBWORKERCLIENT_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBWORKERCLIENT_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBWORKERCLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #if ENABLE(WORKERS) | 8 #if ENABLE(WORKERS) |
| 9 | 9 |
| 10 #include "webkit/api/public/WebWorkerClient.h" | 10 #include "webkit/api/public/WebWorkerClient.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // WebCore::WorkerContextProxy methods: | 38 // WebCore::WorkerContextProxy methods: |
| 39 // These are called on the thread that created the worker. In the renderer | 39 // These are called on the thread that created the worker. In the renderer |
| 40 // process, this will be the main WebKit thread. In the worker process, this | 40 // process, this will be the main WebKit thread. In the worker process, this |
| 41 // will be the thread of the executing worker (not the main WebKit thread). | 41 // will be the thread of the executing worker (not the main WebKit thread). |
| 42 virtual void startWorkerContext(const WebCore::KURL& script_url, | 42 virtual void startWorkerContext(const WebCore::KURL& script_url, |
| 43 const WebCore::String& user_agent, | 43 const WebCore::String& user_agent, |
| 44 const WebCore::String& source_code); | 44 const WebCore::String& source_code); |
| 45 virtual void terminateWorkerContext(); | 45 virtual void terminateWorkerContext(); |
| 46 virtual void postMessageToWorkerContext( | 46 virtual void postMessageToWorkerContext( |
| 47 const WebCore::String& message, | 47 WTF::PassRefPtr<WebCore::SerializedScriptValue> message, |
| 48 WTF::PassOwnPtr<WebCore::MessagePortChannelArray> channels); | 48 WTF::PassOwnPtr<WebCore::MessagePortChannelArray> channels); |
| 49 virtual bool hasPendingActivity() const; | 49 virtual bool hasPendingActivity() const; |
| 50 virtual void workerObjectDestroyed(); | 50 virtual void workerObjectDestroyed(); |
| 51 | 51 |
| 52 // WebWorkerClient methods: | 52 // WebWorkerClient methods: |
| 53 // These are called on the main WebKit thread. | 53 // These are called on the main WebKit thread. |
| 54 virtual void postMessageToWorkerObject( | 54 virtual void postMessageToWorkerObject( |
| 55 const WebKit::WebString& message, | 55 const WebKit::WebString& message, |
| 56 const WebKit::WebMessagePortChannelArray& channels); | 56 const WebKit::WebMessagePortChannelArray& channels); |
| 57 virtual void postExceptionToWorkerObject( | 57 virtual void postExceptionToWorkerObject( |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 WebKit::WebWorker* webworker_; | 141 WebKit::WebWorker* webworker_; |
| 142 bool asked_to_terminate_; | 142 bool asked_to_terminate_; |
| 143 uint32 unconfirmed_message_count_; | 143 uint32 unconfirmed_message_count_; |
| 144 bool worker_context_had_pending_activity_; | 144 bool worker_context_had_pending_activity_; |
| 145 WTF::ThreadIdentifier worker_thread_id_; | 145 WTF::ThreadIdentifier worker_thread_id_; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 #endif // WEBKIT_GLUE_WEBWORKERCLIENT_IMPL_H_ | 150 #endif // WEBKIT_GLUE_WEBWORKERCLIENT_IMPL_H_ |
| OLD | NEW |