1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_TEXT_TRACK_H_
6 #define MEDIA_BASE_TEXT_TRACK_H_
7 
8 #include <memory>
9 #include <string>
10 
11 #include "base/callback.h"
12 #include "base/time/time.h"
13 
14 namespace media {
15 
16 class TextTrackConfig;
17 
18 class TextTrack {
19  public:
~TextTrack()20   virtual ~TextTrack() {}
21   virtual void addWebVTTCue(base::TimeDelta start,
22                             base::TimeDelta end,
23                             const std::string& id,
24                             const std::string& content,
25                             const std::string& settings) = 0;
26 };
27 
28 using AddTextTrackDoneCB = base::OnceCallback<void(std::unique_ptr<TextTrack>)>;
29 
30 using AddTextTrackCB =
31     base::RepeatingCallback<void(const TextTrackConfig& config,
32                                  AddTextTrackDoneCB done_cb)>;
33 
34 }  // namespace media
35 
36 #endif  // MEDIA_BASE_TEXT_TRACK_H_
37