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

Side by Side Diff: webkit/media/buffered_data_source.h

Issue 10535101: Replace Pipeline::SetNetworkActivity() with BufferedDataSource -> WebMediaPlayerImpl callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ 5 #ifndef WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_
6 #define WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ 6 #define WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 13 matching lines...) Expand all
24 24
25 namespace webkit_media { 25 namespace webkit_media {
26 26
27 // A data source capable of loading URLs and buffering the data using an 27 // A data source capable of loading URLs and buffering the data using an
28 // in-memory sliding window. 28 // in-memory sliding window.
29 // 29 //
30 // BufferedDataSource must be created and initialized on the render thread 30 // BufferedDataSource must be created and initialized on the render thread
31 // before being passed to other threads. It may be deleted on any thread. 31 // before being passed to other threads. It may be deleted on any thread.
32 class BufferedDataSource : public media::DataSource { 32 class BufferedDataSource : public media::DataSource {
33 public: 33 public:
34 typedef base::Callback<void(bool)> DownloadingCB;
35
34 BufferedDataSource(MessageLoop* render_loop, 36 BufferedDataSource(MessageLoop* render_loop,
35 WebKit::WebFrame* frame, 37 WebKit::WebFrame* frame,
36 media::MediaLog* media_log); 38 media::MediaLog* media_log,
39 const DownloadingCB& downloading_cb);
37 40
38 // Initialize this object using |url| and |cors_mode|, and call |status_cb| 41 // Initialize this object using |url| and |cors_mode|, and call |status_cb|
39 // when initialization has completed. 42 // when initialization has completed.
40 // 43 //
41 // Method called on the render thread. 44 // Method called on the render thread.
42 void Initialize( 45 void Initialize(
43 const GURL& url, 46 const GURL& url,
44 BufferedResourceLoader::CORSMode cors_mode, 47 BufferedResourceLoader::CORSMode cors_mode,
45 const media::PipelineStatusCB& status_cb); 48 const media::PipelineStatusCB& status_cb);
46 49
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 int cache_miss_retries_left_; 220 int cache_miss_retries_left_;
218 221
219 // Bitrate of the content, 0 if unknown. 222 // Bitrate of the content, 0 if unknown.
220 int bitrate_; 223 int bitrate_;
221 224
222 // Current playback rate. 225 // Current playback rate.
223 float playback_rate_; 226 float playback_rate_;
224 227
225 scoped_refptr<media::MediaLog> media_log_; 228 scoped_refptr<media::MediaLog> media_log_;
226 229
230 DownloadingCB downloading_cb_;
231
227 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); 232 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource);
228 }; 233 };
229 234
230 } // namespace webkit_media 235 } // namespace webkit_media
231 236
232 #endif // WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ 237 #endif // WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698