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

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: Linux build fix, comment update 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
« no previous file with comments | « Source/core/dom/ContextLifecycleNotifier.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerGlobalScope.h
diff --git a/Source/core/workers/WorkerGlobalScope.h b/Source/core/workers/WorkerGlobalScope.h
index e6cd948c438e20b7e9677756a6b955591cc6f1f9..862df04054e9c71fc0337bcdaba87d05d736650b 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 probably called in the main thread.
+ 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());
« no previous file with comments | « Source/core/dom/ContextLifecycleNotifier.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698