diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /WebCore/workers/WorkerMessagingProxy.h | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/workers/WorkerMessagingProxy.h')
-rw-r--r-- | WebCore/workers/WorkerMessagingProxy.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/WebCore/workers/WorkerMessagingProxy.h b/WebCore/workers/WorkerMessagingProxy.h index 7fc9797..841fc9a 100644 --- a/WebCore/workers/WorkerMessagingProxy.h +++ b/WebCore/workers/WorkerMessagingProxy.h @@ -34,18 +34,20 @@ #include "WorkerLoaderProxy.h" #include "WorkerObjectProxy.h" #include <wtf/Noncopyable.h> +#include <wtf/PassOwnPtr.h> #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> #include <wtf/Vector.h> namespace WebCore { + class DedicatedWorkerThread; + class MessagePortChannel; class ScriptExecutionContext; class String; class Worker; - class WorkerThread; - class WorkerMessagingProxy : public WorkerContextProxy, public WorkerObjectProxy, public WorkerLoaderProxy, Noncopyable { + class WorkerMessagingProxy : public WorkerContextProxy, public WorkerObjectProxy, public WorkerLoaderProxy, public Noncopyable { public: WorkerMessagingProxy(Worker*); @@ -53,15 +55,15 @@ namespace WebCore { // (Only use these methods in the worker object thread.) virtual void startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode); virtual void terminateWorkerContext(); - virtual void postMessageToWorkerContext(const String& message); + virtual void postMessageToWorkerContext(const String&, PassOwnPtr<MessagePortChannel>); virtual bool hasPendingActivity() const; virtual void workerObjectDestroyed(); // Implementations of WorkerObjectProxy. // (Only use these methods in the worker context thread.) - virtual void postMessageToWorkerObject(const String& message); + virtual void postMessageToWorkerObject(const String&, PassOwnPtr<MessagePortChannel>); virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL); - virtual void postConsoleMessageToWorkerObject(MessageDestination, MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL); + virtual void postConsoleMessageToWorkerObject(MessageDestination, MessageSource, MessageType, MessageLevel, const String& message, int lineNumber, const String& sourceURL); virtual void confirmMessageFromWorkerObject(bool hasPendingActivity); virtual void reportPendingActivity(bool hasPendingActivity); virtual void workerContextDestroyed(); @@ -72,7 +74,7 @@ namespace WebCore { virtual void postTaskToLoader(PassRefPtr<ScriptExecutionContext::Task>); virtual void postTaskForModeToWorkerContext(PassRefPtr<ScriptExecutionContext::Task>, const String& mode); - void workerThreadCreated(PassRefPtr<WorkerThread>); + void workerThreadCreated(PassRefPtr<DedicatedWorkerThread>); // Only use this method on the worker object thread. bool askedToTerminate() const { return m_askedToTerminate; } @@ -80,6 +82,7 @@ namespace WebCore { private: friend class MessageWorkerTask; friend class WorkerContextDestroyedTask; + friend class WorkerExceptionTask; friend class WorkerThreadActivityReportTask; virtual ~WorkerMessagingProxy(); @@ -90,7 +93,7 @@ namespace WebCore { RefPtr<ScriptExecutionContext> m_scriptExecutionContext; Worker* m_workerObject; - RefPtr<WorkerThread> m_workerThread; + RefPtr<DedicatedWorkerThread> m_workerThread; unsigned m_unconfirmedMessageCount; // Unconfirmed messages from worker object to worker thread. bool m_workerThreadHadPendingActivity; // The latest confirmation from worker thread reported that it was still active. |