| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_TEXT_RENDERER_H_ | 5 #ifndef MEDIA_BASE_TEXT_RENDERER_H_ |
| 6 #define MEDIA_BASE_TEXT_RENDERER_H_ | 6 #define MEDIA_BASE_TEXT_RENDERER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Simple state tracking variable. | 114 // Simple state tracking variable. |
| 115 enum State { | 115 enum State { |
| 116 kUninitialized, | 116 kUninitialized, |
| 117 kPausePending, | 117 kPausePending, |
| 118 kPaused, | 118 kPaused, |
| 119 kPlaying, | 119 kPlaying, |
| 120 kEnded | 120 kEnded |
| 121 }; | 121 }; |
| 122 State state_; | 122 State state_; |
| 123 | 123 |
| 124 typedef std::map<DemuxerStream*, TextTrackState*> TextTrackStateMap; | 124 std::map<DemuxerStream*, std::unique_ptr<TextTrackState>> |
| 125 TextTrackStateMap text_track_state_map_; | 125 text_track_state_map_; |
| 126 | 126 |
| 127 // Indicates how many read requests are in flight. | 127 // Indicates how many read requests are in flight. |
| 128 int pending_read_count_; | 128 int pending_read_count_; |
| 129 | 129 |
| 130 // Indicates which text streams have not delivered end-of-stream yet. | 130 // Indicates which text streams have not delivered end-of-stream yet. |
| 131 typedef std::set<DemuxerStream*> PendingEosSet; | 131 typedef std::set<DemuxerStream*> PendingEosSet; |
| 132 PendingEosSet pending_eos_set_; | 132 PendingEosSet pending_eos_set_; |
| 133 | 133 |
| 134 // NOTE: Weak pointers must be invalidated before all other member variables. | 134 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 135 base::WeakPtrFactory<TextRenderer> weak_factory_; | 135 base::WeakPtrFactory<TextRenderer> weak_factory_; |
| 136 | 136 |
| 137 DISALLOW_IMPLICIT_CONSTRUCTORS(TextRenderer); | 137 DISALLOW_IMPLICIT_CONSTRUCTORS(TextRenderer); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace media | 140 } // namespace media |
| 141 | 141 |
| 142 #endif // MEDIA_BASE_TEXT_RENDERER_H_ | 142 #endif // MEDIA_BASE_TEXT_RENDERER_H_ |
| OLD | NEW |