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

Unified Diff: Source/bindings/v8/custom/V8TextTrackCueCustom.cpp

Issue 224833002: Implement DataCue interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
diff --git a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
index 20d7dd0a066d7a8a38086e7bc77cb3846ddcd3b5..58f6aba06bad0b6649da0d7923ec01deefb80075 100644
--- a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
+++ b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
@@ -30,13 +30,22 @@
#include "config.h"
#include "V8TextTrackCue.h"
+#include "V8DataCue.h"
#include "V8VTTCue.h"
namespace WebCore {
v8::Handle<v8::Value> toV8(TextTrackCue* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
- return toV8(toVTTCue(impl), creationContext, isolate);
+ switch (impl->cueType()) {
+ case TextTrackCue::Data:
+ return toV8(toDataCue(impl), creationContext, isolate);
+ case TextTrackCue::WebVTT:
+ return toV8(toVTTCue(impl), creationContext, isolate);
+ default:
acolwell GONE FROM CHROMIUM 2014/04/04 23:25:27 nit: Please remove default: code so a compiler err
Brendan Long 2014/05/28 16:31:48 I get compile warnings if I remove it: ./../third
+ ASSERT_NOT_REACHED();
+ return v8::Handle<v8::Value>();
+ }
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698