| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "wtf/text/StringImpl.h" | 34 #include "wtf/text/StringImpl.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class Document; | 38 class Document; |
| 39 class Event; | 39 class Event; |
| 40 class EventTarget; | 40 class EventTarget; |
| 41 class MediaQueryListListener; | 41 class MediaQueryListListener; |
| 42 class RequestAnimationFrameCallback; | 42 class RequestAnimationFrameCallback; |
| 43 | 43 |
| 44 class ScriptedAnimationController : public RefCountedWillBeGarbageCollectedFinal
ized<ScriptedAnimationController> { | 44 class ScriptedAnimationController : public RefCountedWillBeGarbageCollected<Scri
ptedAnimationController> { |
| 45 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ScriptedAnimationController); |
| 45 public: | 46 public: |
| 46 static PassRefPtrWillBeRawPtr<ScriptedAnimationController> create(Document*
document) | 47 static PassRefPtrWillBeRawPtr<ScriptedAnimationController> create(Document*
document) |
| 47 { | 48 { |
| 48 return adoptRefWillBeNoop(new ScriptedAnimationController(document)); | 49 return adoptRefWillBeNoop(new ScriptedAnimationController(document)); |
| 49 } | 50 } |
| 50 ~ScriptedAnimationController(); | 51 |
| 51 void trace(Visitor*); | 52 void trace(Visitor*); |
| 52 void clearDocumentPointer() { m_document = nullptr; } | 53 void clearDocumentPointer() { m_document = nullptr; } |
| 53 | 54 |
| 54 typedef int CallbackId; | 55 typedef int CallbackId; |
| 55 | 56 |
| 56 int registerCallback(RequestAnimationFrameCallback*); | 57 int registerCallback(RequestAnimationFrameCallback*); |
| 57 void cancelCallback(CallbackId); | 58 void cancelCallback(CallbackId); |
| 58 void serviceScriptedAnimations(double monotonicTimeNow); | 59 void serviceScriptedAnimations(double monotonicTimeNow); |
| 59 | 60 |
| 60 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); | 61 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 80 | 81 |
| 81 RawPtrWillBeMember<Document> m_document; | 82 RawPtrWillBeMember<Document> m_document; |
| 82 CallbackId m_nextCallbackId; | 83 CallbackId m_nextCallbackId; |
| 83 int m_suspendCount; | 84 int m_suspendCount; |
| 84 WillBeHeapVector<RefPtrWillBeMember<Event> > m_eventQueue; | 85 WillBeHeapVector<RefPtrWillBeMember<Event> > m_eventQueue; |
| 85 WillBeHeapListHashSet<std::pair<RawPtrWillBeMember<const EventTarget>, const
StringImpl*> > m_perFrameEvents; | 86 WillBeHeapListHashSet<std::pair<RawPtrWillBeMember<const EventTarget>, const
StringImpl*> > m_perFrameEvents; |
| 86 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener> > M
ediaQueryListListeners; | 87 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener> > M
ediaQueryListListeners; |
| 87 MediaQueryListListeners m_mediaQueryListListeners; | 88 MediaQueryListListeners m_mediaQueryListListeners; |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 } | 91 } // namespace blink |
| 91 | 92 |
| 92 #endif // ScriptedAnimationController_h | 93 #endif // ScriptedAnimationController_h |
| OLD | NEW |