| Index: media/blink/buffered_data_source.cc
|
| diff --git a/content/renderer/media/buffered_data_source.cc b/media/blink/buffered_data_source.cc
|
| similarity index 97%
|
| rename from content/renderer/media/buffered_data_source.cc
|
| rename to media/blink/buffered_data_source.cc
|
| index 5fc0c59fb6d92749089d7964621f521d07d3bdc8..91ed1a254c8c43cba43aa8011d0e2501cb6a3c51 100644
|
| --- a/content/renderer/media/buffered_data_source.cc
|
| +++ b/media/blink/buffered_data_source.cc
|
| @@ -2,12 +2,11 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/renderer/media/buffered_data_source.h"
|
| +#include "media/blink/buffered_data_source.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/callback_helpers.h"
|
| #include "base/single_thread_task_runner.h"
|
| -#include "content/public/common/url_constants.h"
|
| #include "media/base/media_log.h"
|
| #include "net/base/net_errors.h"
|
|
|
| @@ -26,12 +25,12 @@ const int kNumCacheMissRetries = 3;
|
|
|
| } // namespace
|
|
|
| -namespace content {
|
| +namespace media {
|
|
|
| class BufferedDataSource::ReadOperation {
|
| public:
|
| ReadOperation(int64 position, int size, uint8* data,
|
| - const media::DataSource::ReadCB& callback);
|
| + const DataSource::ReadCB& callback);
|
| ~ReadOperation();
|
|
|
| // Runs |callback_| with the given |result|, deleting the operation
|
| @@ -52,14 +51,14 @@ class BufferedDataSource::ReadOperation {
|
| const int64 position_;
|
| const int size_;
|
| uint8* data_;
|
| - media::DataSource::ReadCB callback_;
|
| + DataSource::ReadCB callback_;
|
|
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(ReadOperation);
|
| };
|
|
|
| BufferedDataSource::ReadOperation::ReadOperation(
|
| int64 position, int size, uint8* data,
|
| - const media::DataSource::ReadCB& callback)
|
| + const DataSource::ReadCB& callback)
|
| : retries_(0),
|
| position_(position),
|
| size_(size),
|
| @@ -83,7 +82,7 @@ BufferedDataSource::BufferedDataSource(
|
| BufferedResourceLoader::CORSMode cors_mode,
|
| const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
|
| WebFrame* frame,
|
| - media::MediaLog* media_log,
|
| + MediaLog* media_log,
|
| BufferedDataSourceHost* host,
|
| const DownloadingCB& downloading_cb)
|
| : url_(url),
|
| @@ -206,7 +205,7 @@ void BufferedDataSource::MediaIsPaused() {
|
| }
|
|
|
| /////////////////////////////////////////////////////////////////////////////
|
| -// media::DataSource implementation.
|
| +// DataSource implementation.
|
| void BufferedDataSource::Stop() {
|
| {
|
| base::AutoLock auto_lock(lock_);
|
| @@ -227,7 +226,7 @@ void BufferedDataSource::SetBitrate(int bitrate) {
|
|
|
| void BufferedDataSource::Read(
|
| int64 position, int size, uint8* data,
|
| - const media::DataSource::ReadCB& read_cb) {
|
| + const DataSource::ReadCB& read_cb) {
|
| DVLOG(1) << "Read: " << position << " offset, " << size << " bytes";
|
| DCHECK(!read_cb.is_null());
|
|
|
| @@ -533,4 +532,4 @@ void BufferedDataSource::UpdateDeferStrategy(bool paused) {
|
| loader_->UpdateDeferStrategy(BufferedResourceLoader::kCapacityDefer);
|
| }
|
|
|
| -} // namespace content
|
| +} // namespace media
|
|
|