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

Unified Diff: Source/core/html/HTMLMediaElement.h

Issue 77853002: Move VTT functionality from TextTrackCue.* to VTTCue.* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments in https://codereview.chromium.org/77853002/#msg2. 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
Index: Source/core/html/HTMLMediaElement.h
diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h
index 9164199348bc7951c216e0f9adcb3ccc1a858b01..37da1fb3005428cc15784aeb8c90076b5c25d5f2 100644
--- a/Source/core/html/HTMLMediaElement.h
+++ b/Source/core/html/HTMLMediaElement.h
@@ -32,6 +32,7 @@
#include "core/html/MediaControllerInterface.h"
#include "core/html/track/TextTrack.h"
#include "core/html/track/TextTrackCue.h"
+#include "core/html/track/vtt/VTTCue.h"
#include "platform/PODIntervalTree.h"
#include "platform/graphics/media/MediaPlayer.h"
#include "public/platform/WebMimeRegistry.h"
@@ -581,7 +582,11 @@ template <>
struct ValueToString<TextTrackCue*> {
static String string(TextTrackCue* const& cue)
{
- return String::format("%p id=%s interval=%f-->%f cue=%s)", cue, cue->id().utf8().data(), cue->startTime(), cue->endTime(), cue->text().utf8().data());
+ if (cue->isVTTCue()) {
acolwell GONE FROM CHROMIUM 2013/11/21 19:22:00 nit: It seems like this should be handled by a vir
gasubic 2013/11/22 15:27:34 Done.
+ VTTCue* vttCue = toVTTCue(cue);
+ return String::format("%p id=%s interval=%f-->%f cue=%s)", cue, cue->id().utf8().data(), cue->startTime(), cue->endTime(), vttCue->text().utf8().data());
+ }
+ return String::format("%p id=%s interval=%f-->%f)", cue, cue->id().utf8().data(), cue->startTime(), cue->endTime());
}
};
#endif

Powered by Google App Engine
This is Rietveld 408576698