Work around WebKeyboardEvent.domCode not being set on OS X.
[chromium-blink-merge.git] / media / base / text_cue.h
blob2afae8d5a4f3976ae296c3a80a0f3618d7b6b017
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_TEXT_CUE_H_
6 #define MEDIA_BASE_TEXT_CUE_H_
8 #include <string>
10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h"
12 #include "media/base/media_export.h"
14 namespace media {
16 // A text buffer to carry the components of a text track cue.
17 class MEDIA_EXPORT TextCue
18 : public base::RefCountedThreadSafe<TextCue> {
19 public:
20 TextCue(const base::TimeDelta& timestamp,
21 const base::TimeDelta& duration,
22 const std::string& id,
23 const std::string& settings,
24 const std::string& text);
26 // Access to constructor parameters.
27 base::TimeDelta timestamp() const { return timestamp_; }
28 base::TimeDelta duration() const { return duration_; }
29 const std::string& id() const { return id_; }
30 const std::string& settings() const { return settings_; }
31 const std::string& text() const { return text_; }
33 private:
34 friend class base::RefCountedThreadSafe<TextCue>;
35 ~TextCue();
37 base::TimeDelta timestamp_;
38 base::TimeDelta duration_;
39 std::string id_;
40 std::string settings_;
41 std::string text_;
43 DISALLOW_IMPLICIT_CONSTRUCTORS(TextCue);
46 } // namespace media
48 #endif // MEDIA_BASE_TEXT_CUE_H_