diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-24 20:22:43 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-24 20:22:43 +0000 |
commit | 27ba8536c70127d3367f4609cb0ee1e65944ae20 (patch) | |
tree | f004485d299b52c673acece6b0e5ca90f5273f3d /webkit/glue/webworker_impl.h | |
parent | 9c16251546f278a3b804dd2034f29234f6354a09 (diff) | |
download | chromium_src-27ba8536c70127d3367f4609cb0ee1e65944ae20.zip chromium_src-27ba8536c70127d3367f4609cb0ee1e65944ae20.tar.gz chromium_src-27ba8536c70127d3367f4609cb0ee1e65944ae20.tar.bz2 |
Use WebWorker and WebWorkerClient from the WebKit API.
BUG=10995
R=jam
Review URL: http://codereview.chromium.org/92144
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14461 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webworker_impl.h')
-rw-r--r-- | webkit/glue/webworker_impl.h | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/webkit/glue/webworker_impl.h b/webkit/glue/webworker_impl.h index 4af1f64..8ae78c6 100644 --- a/webkit/glue/webworker_impl.h +++ b/webkit/glue/webworker_impl.h @@ -5,7 +5,7 @@ #ifndef WEBKIT_GLUE_WEBWORKER_IMPL_H_ #define WEBKIT_GLUE_WEBWORKER_IMPL_H_ -#include "webkit/glue/webworker.h" +#include "third_party/WebKit/WebKit/chromium/public/WebWorker.h" #if ENABLE(WORKERS) @@ -26,33 +26,35 @@ class WorkerThread; // WebCore::WorkerObjectProxy, this class will conver to Chrome data types first // and then call the supplied WebWorkerClient. class WebWorkerImpl: public WebCore::WorkerObjectProxy, - public WebWorker { + public WebKit::WebWorker { public: - WebWorkerImpl(WebWorkerClient* client); + explicit WebWorkerImpl(WebKit::WebWorkerClient* client); virtual ~WebWorkerImpl(); - // WebCore::WorkerObjectProxy implementation. - void postMessageToWorkerObject(const WebCore::String& message); - void postExceptionToWorkerObject(const WebCore::String& errorMessage, - int lineNumber, - const WebCore::String& sourceURL); - void postConsoleMessageToWorkerObject(WebCore::MessageDestination destination, - WebCore::MessageSource source, - WebCore::MessageLevel level, - const WebCore::String& message, - int lineNumber, - const WebCore::String& sourceURL); - void confirmMessageFromWorkerObject(bool hasPendingActivity); - void reportPendingActivity(bool hasPendingActivity); - void workerContextDestroyed(); + // WebCore::WorkerObjectProxy methods: + virtual void postMessageToWorkerObject(const WebCore::String& message); + virtual void postExceptionToWorkerObject( + const WebCore::String& error_message, + int line_number, + const WebCore::String& source_url); + virtual void postConsoleMessageToWorkerObject( + WebCore::MessageDestination destination, + WebCore::MessageSource source, + WebCore::MessageLevel level, + const WebCore::String& message, + int line_number, + const WebCore::String& source_url); + virtual void confirmMessageFromWorkerObject(bool has_pending_activity); + virtual void reportPendingActivity(bool has_pending_activity); + virtual void workerContextDestroyed(); - // WebWorker implementation. - void StartWorkerContext(const GURL& script_url, - const string16& user_agent, - const string16& source_code); - void TerminateWorkerContext(); - void PostMessageToWorkerContext(const string16& message); - void WorkerObjectDestroyed(); + // WebWorker methods: + virtual void startWorkerContext(const WebKit::WebURL& script_url, + const WebKit::WebString& user_agent, + const WebKit::WebString& source_code); + virtual void terminateWorkerContext(); + virtual void postMessageToWorkerContext(const WebKit::WebString& message); + virtual void workerObjectDestroyed(); private: static void PostMessageToWorkerContextTask( @@ -60,7 +62,7 @@ class WebWorkerImpl: public WebCore::WorkerObjectProxy, WebWorkerImpl* this_ptr, const WebCore::String& message); - WebWorkerClient* client_; + WebKit::WebWorkerClient* client_; WTF::RefPtr<WebCore::WorkerThread> worker_thread_; DISALLOW_COPY_AND_ASSIGN(WebWorkerImpl); |