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

Unified Diff: webkit/media/webtexttrack_impl.cc

Issue 13419002: Media Source dispatches inband text tracks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: clean compile 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
« webkit/media/webtexttrack_impl.h ('K') | « webkit/media/webtexttrack_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webtexttrack_impl.cc
diff --git a/webkit/media/webtexttrack_impl.cc b/webkit/media/webtexttrack_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b6602f87af41efcd9da59159282a77260122a88e
--- /dev/null
+++ b/webkit/media/webtexttrack_impl.cc
@@ -0,0 +1,34 @@
+// 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/webtexttrack_impl.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebInbandTextTrackClient.h"
+
+namespace webkit_media {
+
+WebTextTrackImpl::WebTextTrackImpl(WebKit::WebInbandTextTrackClient* client)
+ : client_(client) {
+}
+
+WebTextTrackImpl::~WebTextTrackImpl() {
+ // TODO(matthewjheaney): Aaron suggests that this(?) dtor remove the
+ // text track during destruction of this object.
+}
+
+void WebTextTrackImpl::addWebVTTCue(const base::TimeDelta& start,
+ const base::TimeDelta& end,
+ const std::string& id,
+ const std::string& content,
+ const std::string& settings) {
+ const double startF = start.InSecondsF();
acolwell GONE FROM CHROMIUM 2013/05/10 02:22:08 nit: Inline all of this in the addWebVTTCue() call
Matthew Heaney (Chromium) 2013/05/10 05:21:08 Done.
+ const double endF = end.InSecondsF();
+ const WebKit::WebString webid = WebKit::WebString::fromUTF8(id);
+ const WebKit::WebString webcontent = WebKit::WebString::fromUTF8(content);
+ const WebKit::WebString websettings = WebKit::WebString::fromUTF8(settings);
+
+ client_->addWebVTTCue(startF, endF, webid, webcontent, websettings);
+}
+
+} // namespace webkit_media
« webkit/media/webtexttrack_impl.h ('K') | « webkit/media/webtexttrack_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698