diff options
Diffstat (limited to 'webkit/glue/webworkerclient_impl.h')
-rw-r--r-- | webkit/glue/webworkerclient_impl.h | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/webkit/glue/webworkerclient_impl.h b/webkit/glue/webworkerclient_impl.h index 5a8a4cd..847b341 100644 --- a/webkit/glue/webworkerclient_impl.h +++ b/webkit/glue/webworkerclient_impl.h @@ -7,51 +7,54 @@ #if ENABLE(WORKERS) -#include "webkit/glue/webworkerclient.h" +#include "third_party/WebKit/WebKit/chromium/public/WebWorkerClient.h" #include "WorkerContextProxy.h" #include <wtf/RefPtr.h> -class WebWorker; - namespace WebCore { class ScriptExecutionContext; -}; +} +namespace WebKit { +class WebWorker; +} // The purpose of this class is to provide a WorkerContextProxy // implementation that we can give to WebKit. Internally, it converts the // data types to Chrome compatible ones so that renderer code can use it over // IPC. class WebWorkerClientImpl : public WebCore::WorkerContextProxy, - public WebWorkerClient { + public WebKit::WebWorkerClient { public: WebWorkerClientImpl(WebCore::Worker* worker); - void set_webworker(WebWorker* webworker); + void set_webworker(WebKit::WebWorker* webworker); - // WebCore::WorkerContextProxy implementation - void startWorkerContext(const WebCore::KURL& scriptURL, - const WebCore::String& userAgent, - const WebCore::String& sourceCode); - void terminateWorkerContext(); - void postMessageToWorkerContext(const WebCore::String& message); - bool hasPendingActivity() const; - void workerObjectDestroyed(); + // WebCore::WorkerContextProxy methods: + virtual void startWorkerContext(const WebCore::KURL& script_url, + const WebCore::String& user_agent, + const WebCore::String& source_code); + virtual void terminateWorkerContext(); + virtual void postMessageToWorkerContext(const WebCore::String& message); + virtual bool hasPendingActivity() const; + virtual void workerObjectDestroyed(); - // WebWorkerClient implementation. - void PostMessageToWorkerObject(const string16& message); - void PostExceptionToWorkerObject(const string16& error_message, - int line_number, - const string16& source_url); - void PostConsoleMessageToWorkerObject(int destination, - int source, - int level, - const string16& message, - int line_number, - const string16& source_url); - void ConfirmMessageFromWorkerObject(bool has_pending_activity); - void ReportPendingActivity(bool has_pending_activity); - void WorkerContextDestroyed(); + // WebWorkerClient methods: + virtual void postMessageToWorkerObject(const WebKit::WebString& message); + virtual void postExceptionToWorkerObject( + const WebKit::WebString& error_message, + int line_number, + const WebKit::WebString& source_url); + virtual void postConsoleMessageToWorkerObject( + int destination_id, + int source_id, + int message_level, + const WebKit::WebString& message, + int line_number, + const WebKit::WebString& source_url); + virtual void confirmMessageFromWorkerObject(bool has_pending_activity); + virtual void reportPendingActivity(bool has_pending_activity); + virtual void workerContextDestroyed(); private: virtual ~WebWorkerClientImpl(); @@ -60,7 +63,7 @@ class WebWorkerClientImpl : public WebCore::WorkerContextProxy, WTF::RefPtr<WebCore::ScriptExecutionContext> script_execution_context_; WebCore::Worker* worker_; - WebWorker* webworker_; + WebKit::WebWorker* webworker_; bool asked_to_terminate_; uint32 unconfirmed_message_count_; bool worker_context_had_pending_activity_; |