Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(895)

Unified Diff: Source/core/workers/WorkerGlobalScope.h

Issue 248523003: Remove ActiveDOMObject::willStop, and introduce WorkerGlobalScope::TerminationObserver. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/workers/WorkerGlobalScope.h
diff --git a/Source/core/workers/WorkerGlobalScope.h b/Source/core/workers/WorkerGlobalScope.h
index e6cd948c438e20b7e9677756a6b955591cc6f1f9..9b611d1421443a8912f78ee687f44c2854023453 100644
--- a/Source/core/workers/WorkerGlobalScope.h
+++ b/Source/core/workers/WorkerGlobalScope.h
@@ -82,7 +82,17 @@ namespace WebCore {
void clearScript() { m_script.clear(); }
void clearInspector();
- void willStopActiveDOMObjects();
+ // FIXME: We can remove this interface when we remove openDatabaseSync.
+ class TerminationObserver {
+ public:
+ virtual ~TerminationObserver() { }
+ // The function is called in the main thread.
haraken 2014/04/23 09:17:36 Given that this is not always called from the main
tkent 2014/04/23 09:24:53 Updated the comment.
+ virtual void wasRequestedToTerminate() = 0;
+ };
+ void registerTerminationObserver(TerminationObserver*);
+ void unregisterTerminationObserver(TerminationObserver*);
+ void wasRequestedToTerminate();
+
void dispose();
WorkerThread* thread() const { return m_thread; }
@@ -168,6 +178,7 @@ namespace WebCore {
OwnPtrWillBeMember<WorkerClients> m_workerClients;
double m_timeOrigin;
+ TerminationObserver* m_terminationObserver;
};
DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorkerGlobalScope(), context.isWorkerGlobalScope());

Powered by Google App Engine
This is Rietveld 408576698