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

Unified Diff: webkit/media/buffered_data_source.h

Issue 9836102: Fold WebDataSource into BufferedDataSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | webkit/media/buffered_data_source.cc » ('j') | webkit/media/buffered_data_source.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/buffered_data_source.h
diff --git a/webkit/media/buffered_data_source.h b/webkit/media/buffered_data_source.h
index e9d979ef4f82dabd75182d67766fc93578636167..ea13e6ee51a2e1efa46134f661c386cb43106c48 100644
--- a/webkit/media/buffered_data_source.h
+++ b/webkit/media/buffered_data_source.h
@@ -12,17 +12,20 @@
#include "base/synchronization/lock.h"
#include "googleurl/src/gurl.h"
#include "media/base/data_source.h"
+#include "media/base/pipeline_status.h"
#include "webkit/media/buffered_resource_loader.h"
+class MessageLoop;
+
namespace media {
class MediaLog;
}
namespace webkit_media {
-// This class may be created on any thread, and is callable from the render
-// thread as well as media-specific threads.
-class BufferedDataSource : public WebDataSource {
+// A data source capable of loading URLs and buffering the data using an
+// in-memory sliding window.
Ami GONE FROM CHROMIUM 2012/03/27 05:16:19 doco ctor/dtor thread restrictions? (I think this
scherkus (not reviewing) 2012/03/27 14:10:06 Done.
+class BufferedDataSource : public media::DataSource {
Ami GONE FROM CHROMIUM 2012/03/27 05:16:19 How long till DataSource can become a pure interfa
scherkus (not reviewing) 2012/03/27 14:10:06 set_host() is the only non-pure-virtual method and
public:
BufferedDataSource(MessageLoop* render_loop,
WebKit::WebFrame* frame,
@@ -30,6 +33,25 @@ class BufferedDataSource : public WebDataSource {
virtual ~BufferedDataSource();
+ // Initialize this object using |url|. This object calls |status_cb| when
+ // initialization has completed.
+ //
+ // Method called on the render thread.
+ void Initialize(const GURL& url,
+ const media::PipelineStatusCB& status_cb);
+
+ // Returns true if the media resource has a single origin, false otherwise.
+ //
+ // Method called on the render thread.
+ bool HasSingleOrigin();
+
+ // Cancels initialization, any pending loaders, and any pending read calls
+ // from the demuxer. The caller is expected to release its reference to this
+ // object and never call it again.
+ //
+ // Method called on the render thread.
+ void Abort();
+
// media::DataSource implementation.
// Called from demuxer thread.
virtual void set_host(media::DataSourceHost* host) OVERRIDE;
@@ -46,12 +68,6 @@ class BufferedDataSource : public WebDataSource {
virtual void SetPreload(media::Preload preload) OVERRIDE;
virtual void SetBitrate(int bitrate) OVERRIDE;
- // webkit_glue::WebDataSource implementation.
- virtual void Initialize(
- const GURL& url, const media::PipelineStatusCB& initialize_cb) OVERRIDE;
- virtual bool HasSingleOrigin() OVERRIDE;
- virtual void Abort() OVERRIDE;
-
protected:
// A factory method to create a BufferedResourceLoader based on the read
// parameters. We can override this file to object a mock
« no previous file with comments | « no previous file | webkit/media/buffered_data_source.cc » ('j') | webkit/media/buffered_data_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698