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

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

Issue 10692106: Split BufferedResourceLoader's network callback into separate loading state and progress callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add bug #s Created 8 years, 5 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // a non-HTTP protocol, e.g. local files. This method is called when response 122 // a non-HTTP protocol, e.g. local files. This method is called when response
123 // for initial request is received. 123 // for initial request is received.
124 void NonHttpInitialStartCallback(BufferedResourceLoader::Status status); 124 void NonHttpInitialStartCallback(BufferedResourceLoader::Status status);
125 125
126 // Callback method to be passed to BufferedResourceLoader during range 126 // Callback method to be passed to BufferedResourceLoader during range
127 // request. Once a resource request has started, this method will be called 127 // request. Once a resource request has started, this method will be called
128 // with the error code. This method will be executed on the thread 128 // with the error code. This method will be executed on the thread
129 // BufferedResourceLoader lives, i.e. render thread. 129 // BufferedResourceLoader lives, i.e. render thread.
130 void PartialReadStartCallback(BufferedResourceLoader::Status status); 130 void PartialReadStartCallback(BufferedResourceLoader::Status status);
131 131
132 // Callback method for making a read request to BufferedResourceLoader. 132 // Read callback for BufferedResourceLoader.
133 void ReadCallback(BufferedResourceLoader::Status status, int bytes_read); 133 void ReadCallback(BufferedResourceLoader::Status status, int bytes_read);
134 134
135 // Callback method when a network event is received. 135 // Loading and progress callbacks for HTTP resources.
136 void NetworkEventCallback(); 136 void HttpLoadingCallback(BufferedResourceLoader::LoadingState state);
137 void HttpProgressCallback(int64 position);
137 138
138 void UpdateHostState_Locked(); 139 void UpdateHostState_Locked();
139 140
140 // URL of the resource requested. 141 // URL of the resource requested.
141 GURL url_; 142 GURL url_;
142 143
143 // Members for total bytes of the requested object. It is written once on 144 // Members for total bytes of the requested object. It is written once on
144 // render thread but may be read from any thread. However reading of this 145 // render thread but may be read from any thread. However reading of this
145 // member is guaranteed to happen after it is first written, so we don't 146 // member is guaranteed to happen after it is first written, so we don't
146 // need to protect it. 147 // need to protect it.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 float playback_rate_; 217 float playback_rate_;
217 218
218 scoped_refptr<media::MediaLog> media_log_; 219 scoped_refptr<media::MediaLog> media_log_;
219 220
220 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); 221 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource);
221 }; 222 };
222 223
223 } // namespace webkit_media 224 } // namespace webkit_media
224 225
225 #endif // WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ 226 #endif // WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/media/buffered_data_source.cc » ('j') | webkit/media/buffered_data_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698