Chromium Code Reviews| Index: content/renderer/media/buffered_data_source.h |
| diff --git a/content/renderer/media/buffered_data_source.h b/content/renderer/media/buffered_data_source.h |
| index 77b62788f1b7878857b4e9babf223e47adf939d5..5a6e214e37601a4f308b9c3e3d5652123f698972 100644 |
| --- a/content/renderer/media/buffered_data_source.h |
| +++ b/content/renderer/media/buffered_data_source.h |
| @@ -27,6 +27,20 @@ class MediaLog; |
| namespace content { |
| +class CONTENT_EXPORT BufferedDataSourceHost { |
| + public: |
| + // Set the total size of the media file. |
|
scherkus (not reviewing)
2014/04/03 21:59:37
we should tweak this similar to below ("Notify the
sandersd (OOO until July 31)
2014/04/04 23:48:41
Done.
|
| + virtual void SetTotalBytes(int64 total_bytes) = 0; |
| + |
| + // Notify the host that byte range [start,end] has been buffered. |
| + // TODO(fischman): remove this method when demuxing is push-based instead of |
| + // pull-based. http://crbug.com/131444 |
| + virtual void AddBufferedByteRange(int64 start, int64 end) = 0; |
| + |
| + protected: |
| + virtual ~BufferedDataSourceHost(); |
|
scherkus (not reviewing)
2014/04/03 21:59:37
it's ok to inline this:
http://dev.chromium.org/de
sandersd (OOO until July 31)
2014/04/04 23:48:41
Done.
|
| +}; |
| + |
| // A data source capable of loading URLs and buffering the data using an |
| // in-memory sliding window. |
| // |
| @@ -38,12 +52,10 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { |
| // Buffered byte range changes will be reported to |host|. |downloading_cb| |
| // will be called whenever the downloading/paused state of the source changes. |
| - // TODO(sandersd): Move media::DataSourceHost to |
| - // content::BufferedDataSourceHost. |
| BufferedDataSource(const scoped_refptr<base::MessageLoopProxy>& render_loop, |
| blink::WebFrame* frame, |
| media::MediaLog* media_log, |
| - media::DataSourceHost* host, |
| + BufferedDataSourceHost* host, |
| const DownloadingCB& downloading_cb); |
| virtual ~BufferedDataSource(); |
| @@ -206,7 +218,7 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { |
| scoped_refptr<media::MediaLog> media_log_; |
| // Host object to report buffered byte range changes to. |
| - media::DataSourceHost* host_; |
| + BufferedDataSourceHost* host_; |
| DownloadingCB downloading_cb_; |