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

Side by Side Diff: third_party/WebKit/Source/core/animation/AnimationTimeline.h

Issue 2188993004: Remove AnimationTimeline pre-finalizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_fixAnimationPoisonCrash
Patch Set: Rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include <memory> 44 #include <memory>
45 45
46 namespace blink { 46 namespace blink {
47 47
48 class Document; 48 class Document;
49 class AnimationEffect; 49 class AnimationEffect;
50 50
51 // AnimationTimeline is constructed and owned by Document, and tied to its lifec ycle. 51 // AnimationTimeline is constructed and owned by Document, and tied to its lifec ycle.
52 class CORE_EXPORT AnimationTimeline final : public GarbageCollectedFinalized<Ani mationTimeline>, public ScriptWrappable { 52 class CORE_EXPORT AnimationTimeline final : public GarbageCollectedFinalized<Ani mationTimeline>, public ScriptWrappable {
53 DEFINE_WRAPPERTYPEINFO(); 53 DEFINE_WRAPPERTYPEINFO();
54 USING_PRE_FINALIZER(AnimationTimeline, dispose);
55 public: 54 public:
56 class PlatformTiming : public GarbageCollectedFinalized<PlatformTiming> { 55 class PlatformTiming : public GarbageCollectedFinalized<PlatformTiming> {
57 public: 56 public:
58 // Calls AnimationTimeline's wake() method after duration seconds. 57 // Calls AnimationTimeline's wake() method after duration seconds.
59 virtual void wakeAfter(double duration) = 0; 58 virtual void wakeAfter(double duration) = 0;
60 virtual void serviceOnNextFrame() = 0; 59 virtual void serviceOnNextFrame() = 0;
61 virtual ~PlatformTiming() { } 60 virtual ~PlatformTiming() { }
62 DEFINE_INLINE_VIRTUAL_TRACE() { } 61 DEFINE_INLINE_VIRTUAL_TRACE() { }
63 }; 62 };
64 63
65 static AnimationTimeline* create(Document*, PlatformTiming* = nullptr); 64 static AnimationTimeline* create(Document*, PlatformTiming* = nullptr);
66 ~AnimationTimeline();
67 void dispose();
68 65
69 void serviceAnimations(TimingUpdateReason); 66 void serviceAnimations(TimingUpdateReason);
70 void scheduleNextService(); 67 void scheduleNextService();
71 68
72 Animation* play(AnimationEffect*); 69 Animation* play(AnimationEffect*);
73 HeapVector<Member<Animation>> getAnimations(); 70 HeapVector<Member<Animation>> getAnimations();
74 71
75 void animationAttached(Animation&); 72 void animationAttached(Animation&);
76 73
77 bool isActive(); 74 bool isActive();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 Member<AnimationTimeline> m_timeline; 144 Member<AnimationTimeline> m_timeline;
148 Timer<AnimationTimelineTiming> m_timer; 145 Timer<AnimationTimelineTiming> m_timer;
149 }; 146 };
150 147
151 friend class AnimationAnimationTimelineTest; 148 friend class AnimationAnimationTimelineTest;
152 }; 149 };
153 150
154 } // namespace blink 151 } // namespace blink
155 152
156 #endif 153 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698