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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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
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 23 matching lines...) Expand all
34 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "core/CoreExport.h" 35 #include "core/CoreExport.h"
36 #include "core/animation/Animation.h" 36 #include "core/animation/Animation.h"
37 #include "core/animation/EffectModel.h" 37 #include "core/animation/EffectModel.h"
38 #include "core/dom/Element.h" 38 #include "core/dom/Element.h"
39 #include "platform/Timer.h" 39 #include "platform/Timer.h"
40 #include "platform/animation/CompositorAnimationTimeline.h" 40 #include "platform/animation/CompositorAnimationTimeline.h"
41 #include "platform/heap/Handle.h" 41 #include "platform/heap/Handle.h"
42 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
43 #include "wtf/Vector.h" 43 #include "wtf/Vector.h"
44 #include <memory>
44 45
45 namespace blink { 46 namespace blink {
46 47
47 class Document; 48 class Document;
48 class AnimationEffect; 49 class AnimationEffect;
49 50
50 // 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.
51 class CORE_EXPORT AnimationTimeline final : public GarbageCollectedFinalized<Ani mationTimeline>, public ScriptWrappable { 52 class CORE_EXPORT AnimationTimeline final : public GarbageCollectedFinalized<Ani mationTimeline>, public ScriptWrappable {
52 DEFINE_WRAPPERTYPEINFO(); 53 DEFINE_WRAPPERTYPEINFO();
53 USING_PRE_FINALIZER(AnimationTimeline, dispose); 54 USING_PRE_FINALIZER(AnimationTimeline, dispose);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 HeapHashSet<WeakMember<Animation>> m_animations; 117 HeapHashSet<WeakMember<Animation>> m_animations;
117 118
118 double m_playbackRate; 119 double m_playbackRate;
119 120
120 friend class SMILTimeContainer; 121 friend class SMILTimeContainer;
121 static const double s_minimumDelay; 122 static const double s_minimumDelay;
122 123
123 Member<PlatformTiming> m_timing; 124 Member<PlatformTiming> m_timing;
124 double m_lastCurrentTimeInternal; 125 double m_lastCurrentTimeInternal;
125 126
126 OwnPtr<CompositorAnimationTimeline> m_compositorTimeline; 127 std::unique_ptr<CompositorAnimationTimeline> m_compositorTimeline;
127 128
128 class AnimationTimelineTiming final : public PlatformTiming { 129 class AnimationTimelineTiming final : public PlatformTiming {
129 public: 130 public:
130 AnimationTimelineTiming(AnimationTimeline* timeline) 131 AnimationTimelineTiming(AnimationTimeline* timeline)
131 : m_timeline(timeline) 132 : m_timeline(timeline)
132 , m_timer(this, &AnimationTimelineTiming::timerFired) 133 , m_timer(this, &AnimationTimelineTiming::timerFired)
133 { 134 {
134 ASSERT(m_timeline); 135 ASSERT(m_timeline);
135 } 136 }
136 137
137 void wakeAfter(double duration) override; 138 void wakeAfter(double duration) override;
138 void serviceOnNextFrame() override; 139 void serviceOnNextFrame() override;
139 140
140 void timerFired(Timer<AnimationTimelineTiming>*) { m_timeline->wake(); } 141 void timerFired(Timer<AnimationTimelineTiming>*) { m_timeline->wake(); }
141 142
142 DECLARE_VIRTUAL_TRACE(); 143 DECLARE_VIRTUAL_TRACE();
143 144
144 private: 145 private:
145 Member<AnimationTimeline> m_timeline; 146 Member<AnimationTimeline> m_timeline;
146 Timer<AnimationTimelineTiming> m_timer; 147 Timer<AnimationTimelineTiming> m_timer;
147 }; 148 };
148 149
149 friend class AnimationAnimationTimelineTest; 150 friend class AnimationAnimationTimelineTest;
150 }; 151 };
151 152
152 } // namespace blink 153 } // namespace blink
153 154
154 #endif 155 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698