Chromium Code Reviews| 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 <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 | 98 |
| 99 // Dispatched when the AddTextTrackCB completes, after having created | 99 // Dispatched when the AddTextTrackCB completes, after having created |
| 100 // the TextTrack object associated with |text_stream|. | 100 // the TextTrack object associated with |text_stream|. |
| 101 void OnAddTextTrackDone(DemuxerStream* text_stream, | 101 void OnAddTextTrackDone(DemuxerStream* text_stream, |
| 102 scoped_ptr<TextTrack> text_track); | 102 scoped_ptr<TextTrack> text_track); |
| 103 | 103 |
| 104 // Utility function to post a read request on |text_stream|. | 104 // Utility function to post a read request on |text_stream|. |
| 105 void Read(TextTrackState* state, DemuxerStream* text_stream); | 105 void Read(TextTrackState* state, DemuxerStream* text_stream); |
| 106 | 106 |
| 107 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 107 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 108 base::WeakPtrFactory<TextRenderer> weak_factory_; | |
| 109 base::WeakPtr<TextRenderer> weak_this_; | |
| 110 const AddTextTrackCB add_text_track_cb_; | 108 const AddTextTrackCB add_text_track_cb_; |
| 111 | 109 |
| 112 // Callbacks provided during Initialize(). | 110 // Callbacks provided during Initialize(). |
| 113 base::Closure ended_cb_; | 111 base::Closure ended_cb_; |
| 114 | 112 |
| 115 // Callback provided to Pause(). | 113 // Callback provided to Pause(). |
| 116 base::Closure pause_cb_; | 114 base::Closure pause_cb_; |
| 117 | 115 |
| 118 // Callback provided to Stop(). | 116 // Callback provided to Stop(). |
| 119 base::Closure stop_cb_; | 117 base::Closure stop_cb_; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 133 typedef std::map<DemuxerStream*, TextTrackState*> TextTrackStateMap; | 131 typedef std::map<DemuxerStream*, TextTrackState*> TextTrackStateMap; |
| 134 TextTrackStateMap text_track_state_map_; | 132 TextTrackStateMap text_track_state_map_; |
| 135 | 133 |
| 136 // Indicates how many read requests are in flight. | 134 // Indicates how many read requests are in flight. |
| 137 int pending_read_count_; | 135 int pending_read_count_; |
| 138 | 136 |
| 139 // Indicates which text streams have not delivered end-of-stream yet. | 137 // Indicates which text streams have not delivered end-of-stream yet. |
| 140 typedef std::set<DemuxerStream*> PendingEosSet; | 138 typedef std::set<DemuxerStream*> PendingEosSet; |
| 141 PendingEosSet pending_eos_set_; | 139 PendingEosSet pending_eos_set_; |
| 142 | 140 |
| 141 // NOTE: These must always be last so they're invalidated before other member | |
| 142 // variables might be accessed. | |
| 143 base::WeakPtr<TextRenderer> weak_this_; | |
|
Ami GONE FROM CHROMIUM
2014/03/10 22:02:08
ditto
| |
| 144 base::WeakPtrFactory<TextRenderer> weak_factory_; | |
| 145 | |
| 143 DISALLOW_IMPLICIT_CONSTRUCTORS(TextRenderer); | 146 DISALLOW_IMPLICIT_CONSTRUCTORS(TextRenderer); |
| 144 }; | 147 }; |
| 145 | 148 |
| 146 } // namespace media | 149 } // namespace media |
| 147 | 150 |
| 148 #endif // MEDIA_BASE_TEXT_RENDERER_H_ | 151 #endif // MEDIA_BASE_TEXT_RENDERER_H_ |
| OLD | NEW |