Make GenericTaskQueue even more generic (and usable inside platform/)
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Apr 2015 06:29:36 +0000 (06:29 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Apr 2015 06:29:36 +0000 (06:29 +0000)
commit9700f6f694625e0e56a8e039545eb0da8ca472bd
tree03b96e9e0364081470f3f7d3e179e8e4136904b3
parent46636c0c29699cd7c4d6ed419cf84a2c990fb808
Make GenericTaskQueue even more generic (and usable inside platform/)
https://bugs.webkit.org/show_bug.cgi?id=144414

Reviewed by Eric Carlson.

Templatize GenericTaskQueue so that it can be used from within platform/.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/GenericTaskQueue.cpp: Removed.
* html/HTMLMediaElement.h:
* platform/GenericTaskQueue.h: Renamed from Source/WebCore/dom/GenericTaskQueue.h.
(WebCore::TaskDispatcher::TaskDispatcher): Added default templatized class which just calls the parameter's postTask().
(WebCore::TaskDispatcher::postTask): Call context's postTask().
(WebCore::TaskDispatcher<Timer>::TaskDispatcher): Add a timer version which does not require a context.
(WebCore::TaskDispatcher<Timer>::postTask): Set the timer.
(WebCore::TaskDispatcher<Timer>::timerFired): Call the task.
(WebCore::GenericTaskQueue::GenericTaskQueue): Moved from .cpp.
(WebCore::GenericTaskQueue::enqueueTask): Ditto.
(WebCore::GenericTaskQueue::close): Ditto.
(WebCore::GenericTaskQueue::cancelAllTasks): Ditto.
(WebCore::GenericTaskQueue::hasPendingTasks): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/GenericTaskQueue.cpp [deleted file]
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/GenericTaskQueue.h [moved from Source/WebCore/dom/GenericTaskQueue.h with 51% similarity]