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

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

Issue 1750453002: Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 19 matching lines...) Expand all
30 30
31 #ifndef Animation_h 31 #ifndef Animation_h
32 #define Animation_h 32 #define Animation_h
33 33
34 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 34 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
35 #include "bindings/core/v8/ScriptPromise.h" 35 #include "bindings/core/v8/ScriptPromise.h"
36 #include "bindings/core/v8/ScriptPromiseProperty.h" 36 #include "bindings/core/v8/ScriptPromiseProperty.h"
37 #include "core/CSSPropertyNames.h" 37 #include "core/CSSPropertyNames.h"
38 #include "core/CoreExport.h" 38 #include "core/CoreExport.h"
39 #include "core/animation/AnimationEffect.h" 39 #include "core/animation/AnimationEffect.h"
40 #include "core/dom/ActiveDOMObject.h" 40 #include "core/dom/ContextLifecycleObserver.h"
41 #include "core/dom/DOMException.h" 41 #include "core/dom/DOMException.h"
42 #include "core/events/EventTarget.h" 42 #include "core/events/EventTarget.h"
43 #include "platform/animation/CompositorAnimationPlayerClient.h" 43 #include "platform/animation/CompositorAnimationPlayerClient.h"
44 #include "platform/heap/Handle.h" 44 #include "platform/heap/Handle.h"
45 #include "public/platform/WebCompositorAnimationDelegate.h" 45 #include "public/platform/WebCompositorAnimationDelegate.h"
46 #include "wtf/RefPtr.h" 46 #include "wtf/RefPtr.h"
47 47
48 namespace blink { 48 namespace blink {
49 49
50 class AnimationTimeline; 50 class AnimationTimeline;
51 class CompositorAnimationPlayer; 51 class CompositorAnimationPlayer;
52 class Element; 52 class Element;
53 class ExceptionState; 53 class ExceptionState;
54 54
55 class CORE_EXPORT Animation final 55 class CORE_EXPORT Animation final
56 : public RefCountedGarbageCollectedEventTargetWithInlineData<Animation> 56 : public RefCountedGarbageCollectedEventTargetWithInlineData<Animation>
57 , public ActiveDOMObject 57 , public ContextLifecycleObserver
58 , public WebCompositorAnimationDelegate 58 , public WebCompositorAnimationDelegate
59 , public CompositorAnimationPlayerClient { 59 , public CompositorAnimationPlayerClient {
60 DEFINE_WRAPPERTYPEINFO(); 60 DEFINE_WRAPPERTYPEINFO();
61 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(Animation); 61 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(Animation);
62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Animation); 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Animation);
63 public: 63 public:
64 enum AnimationPlayState { 64 enum AnimationPlayState {
65 Unset, 65 Unset,
66 Idle, 66 Idle,
67 Pending, 67 Pending,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 bool playing() const { return !(playStateInternal() == Idle || limited() || m_paused || m_isPausedForTesting); } 109 bool playing() const { return !(playStateInternal() == Idle || limited() || m_paused || m_isPausedForTesting); }
110 bool limited() const { return limited(currentTimeInternal()); } 110 bool limited() const { return limited(currentTimeInternal()); }
111 bool finishedInternal() const { return m_finished; } 111 bool finishedInternal() const { return m_finished; }
112 112
113 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish); 113 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish);
114 DEFINE_ATTRIBUTE_EVENT_LISTENER(cancel); 114 DEFINE_ATTRIBUTE_EVENT_LISTENER(cancel);
115 115
116 const AtomicString& interfaceName() const override; 116 const AtomicString& interfaceName() const override;
117 ExecutionContext* executionContext() const override; 117 ExecutionContext* executionContext() const override;
118 bool hasPendingActivity() const override; 118 bool hasPendingActivity() const override;
119 void stop() override; 119 void contextDestroyed() override;
120 120
121 double playbackRate() const; 121 double playbackRate() const;
122 void setPlaybackRate(double); 122 void setPlaybackRate(double);
123 const AnimationTimeline* timeline() const { return m_timeline; } 123 const AnimationTimeline* timeline() const { return m_timeline; }
124 AnimationTimeline* timeline() { return m_timeline; } 124 AnimationTimeline* timeline() { return m_timeline; }
125 125
126 double calculateStartTime(double currentTime) const; 126 double calculateStartTime(double currentTime) const;
127 bool hasStartTime() const { return !isNull(m_startTime); } 127 bool hasStartTime() const { return !isNull(m_startTime); }
128 double startTime(bool& isNull) const; 128 double startTime(bool& isNull) const;
129 double startTime() const; 129 double startTime() const;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 OwnPtr<CompositorAnimationPlayer> m_compositorPlayer; 297 OwnPtr<CompositorAnimationPlayer> m_compositorPlayer;
298 298
299 bool m_currentTimePending; 299 bool m_currentTimePending;
300 bool m_stateIsBeingUpdated; 300 bool m_stateIsBeingUpdated;
301 }; 301 };
302 302
303 } // namespace blink 303 } // namespace blink
304 304
305 #endif // Animation_h 305 #endif // Animation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698