diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 19:55:20 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 19:55:20 +0000 |
commit | a9415292f9aedca5c528532f1260118ad384aaed (patch) | |
tree | df6dde3058efb3594a77ef78ce904c624f78da30 /webkit/media/web_data_source.h | |
parent | d2353452f11b73f763ea0be9f1a608d03cfddeac (diff) | |
download | chromium_src-a9415292f9aedca5c528532f1260118ad384aaed.zip chromium_src-a9415292f9aedca5c528532f1260118ad384aaed.tar.gz chromium_src-a9415292f9aedca5c528532f1260118ad384aaed.tar.bz2 |
Replace DataSourceFactory with explicitly initialized DataSources.
BUG=107324
TEST=layout tests
Review URL: https://chromiumcodereview.appspot.com/9243016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media/web_data_source.h')
-rw-r--r-- | webkit/media/web_data_source.h | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/webkit/media/web_data_source.h b/webkit/media/web_data_source.h index e492e88..260e003 100644 --- a/webkit/media/web_data_source.h +++ b/webkit/media/web_data_source.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,6 +9,8 @@ #include "media/base/data_source.h" #include "media/base/pipeline_status.h" +class GURL; + namespace webkit_media { // An interface that allows WebMediaPlayerImpl::Proxy to communicate with the @@ -20,23 +22,17 @@ class WebDataSource : public media::DataSource { // Initialize this object using |url|. This object calls |callback| when // initialization has completed. - virtual void Initialize(const std::string& url, + virtual void Initialize(const GURL& url, const media::PipelineStatusCB& callback) = 0; - // Called to cancel initialization. The callback passed in Initialize() will - // be destroyed and will not be called after this method returns. Once this - // method returns, the object will be in an uninitialized state and - // Initialize() cannot be called again. The caller is expected to release - // its handle to this object and never call it again. - virtual void CancelInitialize() = 0; - // Returns true if the media resource has a single origin, false otherwise. // // Method called on the render thread. virtual bool HasSingleOrigin() = 0; - // This method is used to unblock any read calls that would cause the - // media pipeline to stall. + // 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. virtual void Abort() = 0; @@ -45,15 +41,6 @@ class WebDataSource : public media::DataSource { DISALLOW_COPY_AND_ASSIGN(WebDataSource); }; -// Temporary hack to allow WebMediaPlayerImpl::Proxy::AddDataSource() to -// be called when WebDataSource objects are created. This can be removed -// once WebMediaPlayerImpl::Proxy is fixed so it doesn't have to track -// WebDataSources. Proxy only has to track WebDataSources so it can call Abort() -// on them at shutdown. Once cancellation is added to DataSource and pause -// support in Demuxers cancel pending reads, Proxy shouldn't have to keep -// a WebDataSource list or call Abort(). -typedef base::Callback<void(WebDataSource*)> WebDataSourceBuildObserverHack; - } // namespace webkit_media #endif // WEBKIT_MEDIA_WEB_DATA_SOURCE_H_ |