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

Unified Diff: media/blink/buffered_data_source.cc

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 | « media/blink/buffered_data_source.h ('k') | media/blink/buffered_data_source_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « media/blink/buffered_data_source.h ('k') | media/blink/buffered_data_source_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698