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

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

Issue 1241613004: Rework dispatchEvent so it is consistent for isTrusted support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work around MSVC optimization bug Created 5 years, 5 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool playing() const { return !(playStateInternal() == Idle || limited() || m_paused || m_isPausedForTesting); } 107 bool playing() const { return !(playStateInternal() == Idle || limited() || m_paused || m_isPausedForTesting); }
108 bool limited() const { return limited(currentTimeInternal()); } 108 bool limited() const { return limited(currentTimeInternal()); }
109 bool finishedInternal() const { return m_finished; } 109 bool finishedInternal() const { return m_finished; }
110 110
111 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish); 111 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish);
112 112
113 const AtomicString& interfaceName() const override; 113 const AtomicString& interfaceName() const override;
114 ExecutionContext* executionContext() const override; 114 ExecutionContext* executionContext() const override;
115 bool hasPendingActivity() const override; 115 bool hasPendingActivity() const override;
116 void stop() override; 116 void stop() override;
117 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override;
118 117
119 double playbackRate() const; 118 double playbackRate() const;
120 void setPlaybackRate(double); 119 void setPlaybackRate(double);
121 const AnimationTimeline* timeline() const { return m_timeline; } 120 const AnimationTimeline* timeline() const { return m_timeline; }
122 AnimationTimeline* timeline() { return m_timeline; } 121 AnimationTimeline* timeline() { return m_timeline; }
123 122
124 #if !ENABLE(OILPAN) 123 #if !ENABLE(OILPAN)
125 void detachFromTimeline(); 124 void detachFromTimeline();
126 #endif 125 #endif
127 126
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 173
175 static bool hasLowerPriority(const Animation* animation1, const Animation* a nimation2) 174 static bool hasLowerPriority(const Animation* animation1, const Animation* a nimation2)
176 { 175 {
177 return animation1->sequenceNumber() < animation2->sequenceNumber(); 176 return animation1->sequenceNumber() < animation2->sequenceNumber();
178 } 177 }
179 178
180 bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListene r>, bool useCapture = false) override; 179 bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListene r>, bool useCapture = false) override;
181 180
182 DECLARE_VIRTUAL_TRACE(); 181 DECLARE_VIRTUAL_TRACE();
183 182
183 protected:
184 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override;
185
184 private: 186 private:
185 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffect*); 187 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffect*);
186 188
187 void clearOutdated(); 189 void clearOutdated();
188 190
189 double effectEnd() const; 191 double effectEnd() const;
190 bool limited(double currentTime) const; 192 bool limited(double currentTime) const;
191 193
192 AnimationPlayState calculatePlayState(); 194 AnimationPlayState calculatePlayState();
193 double calculateCurrentTime() const; 195 double calculateCurrentTime() const;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 297
296 OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer; 298 OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer;
297 299
298 bool m_currentTimePending; 300 bool m_currentTimePending;
299 bool m_stateIsBeingUpdated; 301 bool m_stateIsBeingUpdated;
300 }; 302 };
301 303
302 } // namespace blink 304 } // namespace blink
303 305
304 #endif // Animation_h 306 #endif // Animation_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/Animation.cpp » ('j') | Source/core/html/track/TextTrackCue.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698