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 40e549d900f7cb0688c280c797c6446890ab7358..04f9081df9578a8c9c9e31ec2760bd9981b8c454 100644 |
| --- a/content/renderer/media/buffered_data_source.h |
| +++ b/content/renderer/media/buffered_data_source.h |
| @@ -36,11 +36,12 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { |
| public: |
| typedef base::Callback<void(bool)> DownloadingCB; |
| - // |downloading_cb| will be called whenever the downloading/paused state of |
| - // the source changes. |
| + // Buffered byte range changes will be reported to |host|. |downloading_cb| |
| + // will be called whenever the downloading/paused state of the source changes. |
|
scherkus (not reviewing)
2014/03/28 20:54:09
want to a TODO(sandersd) saying how |host| should
sandersd (OOO until July 31)
2014/03/28 21:14:28
Done.
|
| BufferedDataSource(const scoped_refptr<base::MessageLoopProxy>& render_loop, |
| blink::WebFrame* frame, |
| media::MediaLog* media_log, |
| + media::DataSourceHost* host, |
| const DownloadingCB& downloading_cb); |
| virtual ~BufferedDataSource(); |
| @@ -81,7 +82,6 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { |
| // media::DataSource implementation. |
| // Called from demuxer thread. |
| - virtual void set_host(media::DataSourceHost* host) OVERRIDE; |
| virtual void Stop(const base::Closure& closure) OVERRIDE; |
| virtual void Read(int64 position, int size, uint8* data, |
| @@ -129,12 +129,6 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { |
| void LoadingStateChangedCallback(BufferedResourceLoader::LoadingState state); |
| void ProgressCallback(int64 position); |
| - // Report a buffered byte range [start,end] or queue it for later |
| - // reporting if set_host() hasn't been called yet. |
| - void ReportOrQueueBufferedBytes(int64 start, int64 end); |
| - |
| - void UpdateHostState_Locked(); |
| - |
| // Update |loader_|'s deferring strategy in response to a play/pause, or |
| // change in playback rate. |
| void UpdateDeferStrategy(bool paused); |
| @@ -207,11 +201,11 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { |
| // Current playback rate. |
| float playback_rate_; |
| - // Buffered byte ranges awaiting set_host() being called to report to host(). |
| - media::Ranges<int64> queued_buffered_byte_ranges_; |
| - |
| scoped_refptr<media::MediaLog> media_log_; |
| + // Host object to report buffered byte range changes to. |
| + media::DataSourceHost* host_; |
| + |
| DownloadingCB downloading_cb_; |
| // NOTE: Weak pointers must be invalidated before all other member variables. |