Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 <string> | |
| 9 | |
| 10 // TODO(matthewjheaney): see note below | |
| 11 //#include "base/memory/scoped_ptr.h" | |
| 12 #include "base/callback.h" | |
| 13 #include "base/time.h" | |
| 14 | |
| 15 namespace media { | |
| 16 | |
| 17 // Specifies the varieties of text tracks. | |
| 18 enum TextKind { | |
| 19 kTextSubtitles, | |
| 20 kTextCaptions, | |
| 21 kTextDescriptions, | |
| 22 kTextMetadata, | |
| 23 kTextNone | |
| 24 }; | |
| 25 | |
| 26 class TextTrack { | |
| 27 public: | |
| 28 virtual ~TextTrack() {} | |
| 29 virtual void addWebVTTCue(const base::TimeDelta& start, | |
| 30 const base::TimeDelta& end, | |
| 31 const std::string& id, | |
| 32 const std::string& content, | |
| 33 const std::string& settings) = 0; | |
| 34 }; | |
| 35 | |
| 36 // TODO(matthewjheaney): need ruling from Aaron about | |
| 37 // return type: scoped_ptr or scoped_refptr? | |
| 38 // I think it's the case that scoped_refptr requires that | |
| 39 // the type also derive from refcounted. | |
| 40 // Does that imply that TextTrack derives from refcounted? | |
| 41 // Or does that happened somewhere else in the hierarchy? | |
| 42 typedef base::Callback<TextTrack*(TextKind kind, | |
|
acolwell GONE FROM CHROMIUM
2013/05/10 02:22:08
A scoped_ptr should be used since I don't believe
Matthew Heaney (Chromium)
2013/05/10 05:21:08
Done.
| |
| 43 const std::string& label, | |
| 44 const std::string& language)> AddTextTrackCB; | |
| 45 | |
| 46 } // namespace media | |
| 47 | |
| 48 #endif // MEDIA_BASE_TEXT_TRACK_H_ | |
| OLD | NEW |