[GTK] Use RunLoop::Timer in main thread shared timer GTK+ implementation
https://bugs.webkit.org/show_bug.cgi?id=150754
Reviewed by Darin Adler.
Source/WebCore:
It's more efficient because it uses a persistent source and it
simplifies the code even more.
* platform/MainThreadSharedTimer.cpp:
(WebCore::MainThreadSharedTimer::fired): Make it non-const to be
able to use it as function callback of a RunLoop::Timer.
* platform/MainThreadSharedTimer.h:
* platform/gtk/MainThreadSharedTimerGtk.cpp:
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
Initialize the RunLoop::Timer and set the prioriry.
(WebCore::MainThreadSharedTimer::setFireInterval):
(WebCore::MainThreadSharedTimer::stop):
Source/WTF:
Add API to set the priority of a RunLoop::Timer for GLib.
* wtf/RunLoop.h:
* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::TimerBase::setPriority):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191852
268f45cc-cd09-0410-ab3c-
d52691b4dbfc