Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / workers / WorkerReportingProxy.h
index 0d0ccb0..836fd17 100644 (file)
 #define WorkerReportingProxy_h
 
 #include "core/frame/ConsoleTypes.h"
+#include "platform/heap/Handle.h"
 #include "wtf/Forward.h"
 
-namespace WebCore {
+namespace blink {
 
+class ConsoleMessage;
 class WorkerGlobalScope;
 
 // APIs used by workers to report console activity.
@@ -44,7 +46,7 @@ public:
     virtual ~WorkerReportingProxy() { }
 
     virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) = 0;
-    virtual void reportConsoleMessage(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL) = 0;
+    virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) = 0;
     virtual void postMessageToPageInspector(const String&) = 0;
     virtual void updateInspectorStateCookie(const String&) = 0;
 
@@ -54,10 +56,17 @@ public:
     // Invoked when close() is invoked on the worker context.
     virtual void workerGlobalScopeClosed() = 0;
 
-    // Invoked when the thread has stopped.
-    virtual void workerGlobalScopeDestroyed() = 0;
+    // Invoked when the thread is stopped and WorkerGlobalScope is being
+    // destructed. (This is be the last method that is called on this
+    // interface)
+    virtual void workerThreadTerminated() = 0;
+
+    // Invoked when the thread is about to be stopped and WorkerGlobalScope
+    // is to be destructed. (When this is called it is guaranteed that
+    // WorkerGlobalScope is still alive)
+    virtual void willDestroyWorkerGlobalScope() = 0;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // WorkerReportingProxy_h