Index: Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp |
diff --git a/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp b/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp |
index d4c47c0d724d78d63995f0db74d84815b93c1600..2628db787e7b967146b1754662fc0021d1e36dd0 100644 |
--- a/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp |
+++ b/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp |
@@ -22,6 +22,7 @@ PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> CompositorWorkerGlobalScope: |
CompositorWorkerGlobalScope::CompositorWorkerGlobalScope(const KURL& url, const String& userAgent, CompositorWorkerThread* thread, double timeOrigin, const SecurityOrigin* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
: WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, workerClients) |
+ , m_callbackCollection(this) |
{ |
} |
@@ -43,6 +44,21 @@ void CompositorWorkerGlobalScope::postMessage(ExecutionContext*, PassRefPtr<Seri |
thread()->workerObjectProxy().postMessageToWorkerObject(message, channels.release()); |
} |
+int CompositorWorkerGlobalScope::requestAnimationFrame(FrameRequestCallback* callback) |
+{ |
+ return m_callbackCollection.registerCallback(callback); |
+} |
+ |
+void CompositorWorkerGlobalScope::cancelAnimationFrame(int id) |
+{ |
+ m_callbackCollection.cancelCallback(id); |
+} |
+ |
+void CompositorWorkerGlobalScope::executeAnimationFrameCallbacks(double highResTimeNow) |
+{ |
+ m_callbackCollection.executeCallbacks(highResTimeNow, highResTimeNow); |
+} |
+ |
CompositorWorkerThread* CompositorWorkerGlobalScope::thread() const |
{ |
return static_cast<CompositorWorkerThread*>(WorkerGlobalScope::thread()); |