Bumping manifests a=b2g-bump
[gecko.git] / dom / animation / AnimationEffect.h
blob55abb7b6cf47486d6c73e4b19f1532f5be3bae32
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"
13 struct JSContext;
15 namespace mozilla {
16 namespace dom {
18 class AnimationEffect MOZ_FINAL : public nsWrapperCache
20 public:
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();
37 private:
38 ~AnimationEffect() { }
40 nsRefPtr<Animation> mAnimation;
43 } // namespace dom
44 } // namespace mozilla
46 #endif // mozilla_dom_AnimationEffect_h