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

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

Issue 491053004: Expose Web Animations API to Web Workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Exposing the Web Animations API to Web Workers Created 6 years, 4 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 4871f880a6a926e743286b6e155b90b09b4d71d8..b88b25175d16c4d4982049435cff4fd6a684e053 100644
--- a/Source/core/workers/WorkerGlobalScope.h
+++ b/Source/core/workers/WorkerGlobalScope.h
@@ -29,6 +29,7 @@
#include "bindings/core/v8/WorkerScriptController.h"
#include "core/dom/ExecutionContext.h"
+#include "core/dom/RequestAnimationFrameCallback.h"
#include "core/events/EventListener.h"
#include "core/events/EventTarget.h"
#include "core/frame/DOMWindowBase64.h"
@@ -38,17 +39,20 @@
#include "platform/heap/Handle.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "wtf/Assertions.h"
+#include "wtf/Functional.h"
#include "wtf/HashMap.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
#include "wtf/text/AtomicStringHash.h"
namespace blink {
class Blob;
class ExceptionState;
+ class ListOfElements;
class ScheduledAction;
class WorkerClients;
class WorkerConsole;
@@ -56,6 +60,7 @@ namespace blink {
class WorkerLocation;
class WorkerNavigator;
class WorkerThread;
+ class RequestAnimationFrameCallback;
class WorkerGlobalScope : public RefCountedWillBeRefCountedGarbageCollected<WorkerGlobalScope>, public SecurityContext, public ExecutionContext, public ExecutionContextClient, public WillBeHeapSupplementable<WorkerGlobalScope>, public EventTargetWithInlineData, public DOMWindowBase64 {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope);
@@ -63,6 +68,12 @@ namespace blink {
public:
virtual ~WorkerGlobalScope();
+ OwnPtr<Vector<OwnPtr<RequestAnimationFrameCallback> > > rAFPendingList;
+ void requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback> insert);
+ void processRAF(double monotonicAnimationStartTime);
+ void processRAFOnWorkerThread(double monotonicAnimationStartTime);
+
+
virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; }
virtual ExecutionContext* executionContext() const OVERRIDE FINAL;

Powered by Google App Engine
This is Rietveld 408576698