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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/media/webtexttrack_impl.h"
6 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInbandTextTrackCli ent.h"
8
9 namespace webkit_media {
10
11 WebTextTrackImpl::WebTextTrackImpl(WebKit::WebInbandTextTrackClient* client)
12 : client_(client) {
13 }
14
15 WebTextTrackImpl::~WebTextTrackImpl() {
16 // TODO(matthewjheaney): Aaron suggests that this(?) dtor remove the
17 // text track during destruction of this object.
18 }
19
20 void WebTextTrackImpl::addWebVTTCue(const base::TimeDelta& start,
21 const base::TimeDelta& end,
22 const std::string& id,
23 const std::string& content,
24 const std::string& settings) {
25 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.
26 const double endF = end.InSecondsF();
27 const WebKit::WebString webid = WebKit::WebString::fromUTF8(id);
28 const WebKit::WebString webcontent = WebKit::WebString::fromUTF8(content);
29 const WebKit::WebString websettings = WebKit::WebString::fromUTF8(settings);
30
31 client_->addWebVTTCue(startF, endF, webid, webcontent, websettings);
32 }
33
34 } // namespace webkit_media
OLDNEW
« 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