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

Unified Diff: Source/core/html/track/TextTrackList.h

Issue 83073006: Add "change" and "removetrack" events to TextTrackList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@add-track-id-again
Patch Set: Fix test results for Opera onremovetrack test Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/TextTrackList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrackList.h
diff --git a/Source/core/html/track/TextTrackList.h b/Source/core/html/track/TextTrackList.h
index 09385902209c8f155395ec1c2f193cae9bc24f38..7c150b2c931935a69628810a8bbec9c031a7c833 100644
--- a/Source/core/html/track/TextTrackList.h
+++ b/Source/core/html/track/TextTrackList.h
@@ -36,6 +36,7 @@
namespace WebCore {
+class GenericEventQueue;
class HTMLMediaElement;
class TextTrack;
class TextTrackList;
@@ -64,30 +65,31 @@ public:
virtual ExecutionContext* executionContext() const OVERRIDE;
DEFINE_ATTRIBUTE_EVENT_LISTENER(addtrack);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(change);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(removetrack);
void clearOwner() { m_owner = 0; }
Node* owner() const;
- bool isFiringEventListeners() { return m_dispatchingEvents; }
+ void scheduleChangeEvent();
private:
explicit TextTrackList(HTMLMediaElement*);
+ void scheduleTrackEvent(const AtomicString& eventName, PassRefPtr<TextTrack>);
+
void scheduleAddTrackEvent(PassRefPtr<TextTrack>);
- void asyncEventTimerFired(Timer<TextTrackList>*);
+ void scheduleRemoveTrackEvent(PassRefPtr<TextTrack>);
void invalidateTrackIndexesAfterTrack(TextTrack*);
HTMLMediaElement* m_owner;
- Vector<RefPtr<Event> > m_pendingEvents;
- Timer<TextTrackList> m_pendingEventTimer;
+ OwnPtr<GenericEventQueue> m_asyncEventQueue;
Vector<RefPtr<TextTrack> > m_addTrackTracks;
Vector<RefPtr<TextTrack> > m_elementTracks;
Vector<RefPtr<TextTrack> > m_inbandTracks;
-
- int m_dispatchingEvents;
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/TextTrackList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698