Chromium Code Reviews| Index: media/base/text_track.h |
| diff --git a/media/base/text_track.h b/media/base/text_track.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6a7e099724910375f62a593ea2c0b4456dc5defd |
| --- /dev/null |
| +++ b/media/base/text_track.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright (c) 2012 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. |
| + |
| +#ifndef MEDIA_BASE_TEXT_TRACK_H_ |
| +#define MEDIA_BASE_TEXT_TRACK_H_ |
| + |
| +#include <string> |
| + |
| +// TODO(matthewjheaney): see note below |
| +//#include "base/memory/scoped_ptr.h" |
| +#include "base/callback.h" |
| +#include "base/time.h" |
| + |
| +namespace media { |
| + |
| +// Specifies the varieties of text tracks. |
| +enum TextKind { |
| + kTextSubtitles, |
| + kTextCaptions, |
| + kTextDescriptions, |
| + kTextMetadata, |
| + kTextNone |
| +}; |
| + |
| +class TextTrack { |
| + public: |
| + virtual ~TextTrack() {} |
| + virtual void addWebVTTCue(const base::TimeDelta& start, |
| + const base::TimeDelta& end, |
| + const std::string& id, |
| + const std::string& content, |
| + const std::string& settings) = 0; |
| +}; |
| + |
| +// TODO(matthewjheaney): need ruling from Aaron about |
| +// return type: scoped_ptr or scoped_refptr? |
| +// I think it's the case that scoped_refptr requires that |
| +// the type also derive from refcounted. |
| +// Does that imply that TextTrack derives from refcounted? |
| +// Or does that happened somewhere else in the hierarchy? |
| +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.
|
| + const std::string& label, |
| + const std::string& language)> AddTextTrackCB; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_TEXT_TRACK_H_ |