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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webkit/media/texttrack_impl.h ('k') | webkit/media/webinbandtexttrack_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/texttrack_impl.h"
6 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInbandTextTrackCli ent.h"
7 #include "webkit/media/webinbandtexttrack_impl.h"
8
9 namespace webkit_media {
10
11 TextTrackImpl::TextTrackImpl(WebInbandTextTrackImpl* text_track)
12 : text_track_(text_track) {
13 // This impl object assumes ownership of the text_track object.
14 }
15
16 TextTrackImpl::~TextTrackImpl() {
17 }
18
19 void TextTrackImpl::addWebVTTCue(const base::TimeDelta& start,
20 const base::TimeDelta& end,
21 const std::string& id,
22 const std::string& content,
23 const std::string& settings) {
24 if (WebKit::WebInbandTextTrackClient* client = text_track_->client())
25 client->addWebVTTCue(start.InSecondsF(),
26 end.InSecondsF(),
27 WebKit::WebString::fromUTF8(id),
28 WebKit::WebString::fromUTF8(content),
29 WebKit::WebString::fromUTF8(settings));
30 }
31
32 } // namespace webkit_media
OLDNEW
« 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