Chromium Code Reviews| 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..b07e2a986ccd3b3e82c8a614b48c5cff7866390e |
| --- /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 owndership of the text_track object. |
|
acolwell GONE FROM CHROMIUM
2013/05/17 16:32:08
nit:s/owndership/ownership/
Matthew Heaney (Chromium)
2013/05/18 01:35:48
Done.
|
| +} |
| + |
| +TextTrackImpl::~TextTrackImpl() { |
| + delete text_track_; |
| +} |
| + |
| +void TextTrackImpl::addWebVTTCue(const base::TimeDelta& start, |
| + const base::TimeDelta& end, |
| + const std::string& id, |
| + const std::string& content, |
| + const std::string& settings) { |
| + text_track_->client()->addWebVTTCue(start.InSecondsF(), |
|
acolwell GONE FROM CHROMIUM
2013/05/17 16:32:08
nit: I think you may need a null check on client()
Matthew Heaney (Chromium)
2013/05/18 01:35:48
Done.
|
| + end.InSecondsF(), |
| + WebKit::WebString::fromUTF8(id), |
| + WebKit::WebString::fromUTF8(content), |
| + WebKit::WebString::fromUTF8(settings)); |
| +} |
| + |
| +} // namespace webkit_media |