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

Unified Diff: webkit/media/texttrack_impl.cc

Issue 13419002: Media Source dispatches inband text tracks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 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 | « webkit/media/texttrack_impl.h ('k') | webkit/media/webinbandtexttrack_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/texttrack_impl.cc
diff --git a/webkit/media/texttrack_impl.cc b/webkit/media/texttrack_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9dbd4aeb9d0070490f8ad74c385a7e55aef9080d
--- /dev/null
+++ b/webkit/media/texttrack_impl.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/media/texttrack_impl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebInbandTextTrackClient.h"
+#include "webkit/media/webinbandtexttrack_impl.h"
+
+namespace webkit_media {
+
+TextTrackImpl::TextTrackImpl(WebInbandTextTrackImpl* text_track)
+ : text_track_(text_track) {
+ // This impl object assumes ownership of the text_track object.
+}
+
+TextTrackImpl::~TextTrackImpl() {
+}
+
+void TextTrackImpl::addWebVTTCue(const base::TimeDelta& start,
+ const base::TimeDelta& end,
+ const std::string& id,
+ const std::string& content,
+ const std::string& settings) {
+ if (WebKit::WebInbandTextTrackClient* client = text_track_->client())
+ client->addWebVTTCue(start.InSecondsF(),
+ end.InSecondsF(),
+ WebKit::WebString::fromUTF8(id),
+ WebKit::WebString::fromUTF8(content),
+ WebKit::WebString::fromUTF8(settings));
+}
+
+} // namespace webkit_media
« no previous file with comments | « webkit/media/texttrack_impl.h ('k') | webkit/media/webinbandtexttrack_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698