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

Unified Diff: Source/core/html/track/TrackEvent.cpp

Issue 790973002: Use event init dictionary in core/html/track (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@union-includes
Patch Set: Created 6 years 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/track/TrackEvent.h ('k') | Source/core/html/track/TrackEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TrackEvent.cpp
diff --git a/Source/core/html/track/TrackEvent.cpp b/Source/core/html/track/TrackEvent.cpp
index 293a9478f924966479334890e35c1cf180cf2ff9..6ff6ea61564a99f3b50227b6eac1080553ceda0c 100644
--- a/Source/core/html/track/TrackEvent.cpp
+++ b/Source/core/html/track/TrackEvent.cpp
@@ -33,19 +33,20 @@
namespace blink {
-TrackEventInit::TrackEventInit()
-{
-}
-
-
TrackEvent::TrackEvent()
{
}
TrackEvent::TrackEvent(const AtomicString& type, const TrackEventInit& initializer)
: Event(type, initializer)
- , m_track(initializer.track)
{
+ const VideoTrackOrAudioTrackOrTextTrack& track = initializer.track();
+ if (track.isVideoTrack())
+ m_track = track.getAsVideoTrack();
+ if (track.isAudioTrack())
philipj_slow 2014/12/10 08:22:48 I'm guessing the compiler can't figure out that th
bashi 2014/12/10 08:45:56 Done. The compiler checks the type of the given va
+ m_track = track.getAsAudioTrack();
+ if (track.isTextTrack())
+ m_track = track.getAsTextTrack();
}
TrackEvent::~TrackEvent()
« no previous file with comments | « Source/core/html/track/TrackEvent.h ('k') | Source/core/html/track/TrackEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698