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

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

Issue 7591001: Log BufferedResourceLoader events to MediaLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Picking nits. Created 9 years, 4 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
« no previous file with comments | « media/base/media_log_event.h ('k') | webkit/glue/media/buffered_data_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ 5 #ifndef WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_
6 #define WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ 6 #define WEBKIT_GLUE_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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "media/base/filter_factories.h" 13 #include "media/base/filter_factories.h"
14 #include "media/base/filters.h" 14 #include "media/base/filters.h"
15 #include "webkit/glue/media/buffered_resource_loader.h" 15 #include "webkit/glue/media/buffered_resource_loader.h"
16 16
17 namespace media {
18 class MediaLog;
19 }
20
17 namespace webkit_glue { 21 namespace webkit_glue {
18 22
19 class BufferedDataSource : public WebDataSource { 23 class BufferedDataSource : public WebDataSource {
20 public: 24 public:
21 // Creates a DataSourceFactory for building BufferedDataSource objects. 25 // Creates a DataSourceFactory for building BufferedDataSource objects.
22 static media::DataSourceFactory* CreateFactory( 26 static media::DataSourceFactory* CreateFactory(
23 MessageLoop* render_loop, 27 MessageLoop* render_loop,
24 WebKit::WebFrame* frame, 28 WebKit::WebFrame* frame,
29 media::MediaLog* media_log,
25 WebDataSourceBuildObserverHack* build_observer); 30 WebDataSourceBuildObserverHack* build_observer);
26 31
27 BufferedDataSource(MessageLoop* render_loop, 32 BufferedDataSource(MessageLoop* render_loop,
28 WebKit::WebFrame* frame); 33 WebKit::WebFrame* frame,
34 media::MediaLog* media_log);
29 35
30 virtual ~BufferedDataSource(); 36 virtual ~BufferedDataSource();
31 37
32 // media::Filter implementation. 38 // media::Filter implementation.
33 virtual void set_host(media::FilterHost* host); 39 virtual void set_host(media::FilterHost* host);
34 virtual void Stop(media::FilterCallback* callback); 40 virtual void Stop(media::FilterCallback* callback);
35 virtual void SetPlaybackRate(float playback_rate); 41 virtual void SetPlaybackRate(float playback_rate);
36 42
37 // media::DataSource implementation. 43 // media::DataSource implementation.
38 // Called from demuxer thread. 44 // Called from demuxer thread.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // element. 201 // element.
196 media::Preload preload_; 202 media::Preload preload_;
197 203
198 // Keeps track of whether we used a Range header in the initialization 204 // Keeps track of whether we used a Range header in the initialization
199 // request. 205 // request.
200 bool using_range_request_; 206 bool using_range_request_;
201 207
202 // Number of cache miss retries left. 208 // Number of cache miss retries left.
203 int cache_miss_retries_left_; 209 int cache_miss_retries_left_;
204 210
211 scoped_refptr<media::MediaLog> media_log_;
212
205 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); 213 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource);
206 }; 214 };
207 215
208 } // namespace webkit_glue 216 } // namespace webkit_glue
209 217
210 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ 218 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « media/base/media_log_event.h ('k') | webkit/glue/media/buffered_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698