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

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

Issue 9836102: Fold WebDataSource into BufferedDataSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: dcheck-o-rama Created 8 years, 8 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 | « webkit/media/buffered_data_source_unittest.cc ('k') | webkit/media/buffered_resource_loader.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) 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_RESOURCE_LOADER_H_ 5 #ifndef WEBKIT_MEDIA_BUFFERED_RESOURCE_LOADER_H_
6 #define WEBKIT_MEDIA_BUFFERED_RESOURCE_LOADER_H_ 6 #define WEBKIT_MEDIA_BUFFERED_RESOURCE_LOADER_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/timer.h" 12 #include "base/timer.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "media/base/seekable_buffer.h" 14 #include "media/base/seekable_buffer.h"
15 #include "net/base/file_stream.h" 15 #include "net/base/file_stream.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader .h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader .h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader Client.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader Client.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
20 #include "webkit/media/active_loader.h" 20 #include "webkit/media/active_loader.h"
21 #include "webkit/media/web_data_source.h"
22 #include "webkit/media/webmediaplayer_impl.h"
23 21
24 namespace media { 22 namespace media {
25 class MediaLog; 23 class MediaLog;
26 } 24 }
27 25
28 namespace webkit_media { 26 namespace webkit_media {
29 27
30 const int64 kPositionNotSpecified = -1; 28 const int64 kPositionNotSpecified = -1;
31 29
32 const char kHttpScheme[] = "http"; 30 const char kHttpScheme[] = "http";
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 virtual void didReceiveCachedMetadata( 150 virtual void didReceiveCachedMetadata(
153 WebKit::WebURLLoader* loader, 151 WebKit::WebURLLoader* loader,
154 const char* data, int dataLength); 152 const char* data, int dataLength);
155 virtual void didFinishLoading( 153 virtual void didFinishLoading(
156 WebKit::WebURLLoader* loader, 154 WebKit::WebURLLoader* loader,
157 double finishTime); 155 double finishTime);
158 virtual void didFail( 156 virtual void didFail(
159 WebKit::WebURLLoader* loader, 157 WebKit::WebURLLoader* loader,
160 const WebKit::WebURLError&); 158 const WebKit::WebURLError&);
161 159
160 // Returns true if the media resource has a single origin, false otherwise.
161 // Only valid to call after Start() has completed.
162 bool HasSingleOrigin() const; 162 bool HasSingleOrigin() const;
163 163
164 // Sets the defer strategy to the given value. 164 // Sets the defer strategy to the given value.
165 void UpdateDeferStrategy(DeferStrategy strategy); 165 void UpdateDeferStrategy(DeferStrategy strategy);
166 166
167 // Sets the playback rate to the given value and updates buffer window 167 // Sets the playback rate to the given value and updates buffer window
168 // accordingly. 168 // accordingly.
169 void SetPlaybackRate(float playback_rate); 169 void SetPlaybackRate(float playback_rate);
170 170
171 // Sets the bitrate to the given value and updates buffer window 171 // Sets the bitrate to the given value and updates buffer window
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 float playback_rate_; 299 float playback_rate_;
300 300
301 scoped_refptr<media::MediaLog> media_log_; 301 scoped_refptr<media::MediaLog> media_log_;
302 302
303 DISALLOW_COPY_AND_ASSIGN(BufferedResourceLoader); 303 DISALLOW_COPY_AND_ASSIGN(BufferedResourceLoader);
304 }; 304 };
305 305
306 } // namespace webkit_media 306 } // namespace webkit_media
307 307
308 #endif // WEBKIT_MEDIA_BUFFERED_RESOURCE_LOADER_H_ 308 #endif // WEBKIT_MEDIA_BUFFERED_RESOURCE_LOADER_H_
OLDNEW
« no previous file with comments | « webkit/media/buffered_data_source_unittest.cc ('k') | webkit/media/buffered_resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698