OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/renderer/media/texttrack_impl.h" | 5 #include "content/renderer/media/texttrack_impl.h" |
6 | 6 |
| 7 #include "content/renderer/media/webinbandtexttrack_impl.h" |
7 #include "third_party/WebKit/public/web/WebInbandTextTrackClient.h" | 8 #include "third_party/WebKit/public/web/WebInbandTextTrackClient.h" |
8 #include "webkit/renderer/media/webinbandtexttrack_impl.h" | |
9 | 9 |
10 namespace webkit_media { | 10 namespace content { |
11 | 11 |
12 TextTrackImpl::TextTrackImpl(WebInbandTextTrackImpl* text_track) | 12 TextTrackImpl::TextTrackImpl(WebInbandTextTrackImpl* text_track) |
13 : text_track_(text_track) { | 13 : text_track_(text_track) { |
14 // This impl object assumes ownership of the text_track object. | 14 // This impl object assumes ownership of the text_track object. |
15 } | 15 } |
16 | 16 |
17 TextTrackImpl::~TextTrackImpl() { | 17 TextTrackImpl::~TextTrackImpl() { |
18 } | 18 } |
19 | 19 |
20 void TextTrackImpl::addWebVTTCue(const base::TimeDelta& start, | 20 void TextTrackImpl::addWebVTTCue(const base::TimeDelta& start, |
21 const base::TimeDelta& end, | 21 const base::TimeDelta& end, |
22 const std::string& id, | 22 const std::string& id, |
23 const std::string& content, | 23 const std::string& content, |
24 const std::string& settings) { | 24 const std::string& settings) { |
25 if (WebKit::WebInbandTextTrackClient* client = text_track_->client()) | 25 if (WebKit::WebInbandTextTrackClient* client = text_track_->client()) |
26 client->addWebVTTCue(start.InSecondsF(), | 26 client->addWebVTTCue(start.InSecondsF(), |
27 end.InSecondsF(), | 27 end.InSecondsF(), |
28 WebKit::WebString::fromUTF8(id), | 28 WebKit::WebString::fromUTF8(id), |
29 WebKit::WebString::fromUTF8(content), | 29 WebKit::WebString::fromUTF8(content), |
30 WebKit::WebString::fromUTF8(settings)); | 30 WebKit::WebString::fromUTF8(settings)); |
31 } | 31 } |
32 | 32 |
33 } // namespace webkit_media | 33 } // namespace content |
OLD | NEW |