Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9729)

Unified Diff: content/renderer/media/buffered_data_source.h

Issue 224093011: Move DataSourceHost to BufferedDataSourceHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows release build. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/buffered_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..40acdcd0d9863130e8fe652b74031b3e7fc8e4fc 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:
+ // Notify the host of the total size of the media file.
+ 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() {};
+};
+
// 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_;
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/buffered_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698