1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_AnimationEffect_h
7 #define mozilla_dom_AnimationEffect_h
9 #include "nsCycleCollectionParticipant.h"
10 #include "nsWrapperCache.h"
11 #include "mozilla/dom/Animation.h"
18 class AnimationEffect MOZ_FINAL
: public nsWrapperCache
21 explicit AnimationEffect(Animation
* aAnimation
)
22 : mAnimation(aAnimation
)
26 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnimationEffect
)
27 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AnimationEffect
)
29 Animation
* GetParentObject() const { return mAnimation
; }
30 virtual JSObject
* WrapObject(JSContext
* aCx
) MOZ_OVERRIDE
;
32 // AnimationEffect interface
33 void GetName(nsString
& aRetVal
) const {
34 aRetVal
= mAnimation
->Name();
38 ~AnimationEffect() { }
40 nsRefPtr
<Animation
> mAnimation
;
44 } // namespace mozilla
46 #endif // mozilla_dom_AnimationEffect_h