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

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: Remove text attribute Created 6 years, 7 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
« no previous file with comments | « LayoutTests/media/video-test.js ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
diff --git a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
index 8d078eb91e96aa0dff57cee35fef60183d36e0a6..f6e59fe3774a64545db5d4bad634a3cc1e5d7f1b 100644
--- a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
+++ b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
@@ -30,13 +30,22 @@
#include "config.h"
#include "bindings/core/v8/V8TextTrackCue.h"
+#include "bindings/core/v8/V8DataCue.h"
#include "bindings/core/v8/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:
+ ASSERT_NOT_REACHED();
+ return v8::Handle<v8::Value>();
+ }
}
} // namespace WebCore
« no previous file with comments | « LayoutTests/media/video-test.js ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698