OLD | NEW |
---|---|
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 void ReadInternal(); | 106 void ReadInternal(); |
107 | 107 |
108 // Calls |read_cb_| and reset all read parameters. Non-negative |bytes_read| | 108 // Calls |read_cb_| and reset all read parameters. Non-negative |bytes_read| |
109 // values represent successful reads, otherwise |bytes_read| should be | 109 // values represent successful reads, otherwise |bytes_read| should be |
110 // kReadError. | 110 // kReadError. |
111 void DoneRead_Locked(int bytes_read); | 111 void DoneRead_Locked(int bytes_read); |
112 | 112 |
113 // Calls |initialize_cb_| and reset it. | 113 // Calls |initialize_cb_| and reset it. |
114 void DoneInitialization_Locked(media::PipelineStatus status); | 114 void DoneInitialization_Locked(media::PipelineStatus status); |
115 | 115 |
116 // Callback method for |loader_| if URL for the resource requested is using | 116 // BufferedResourceLoader::Start() callback for initial load. |
117 // HTTP protocol. This method is called when response for initial request is | 117 void StartCallback(BufferedResourceLoader::Status status); |
118 // received. | |
119 void HttpInitialStartCallback(BufferedResourceLoader::Status status); | |
120 | 118 |
121 // Callback method for |loader_| if URL for the resource requested is using | 119 // BufferedResourceLoader::Start() callback for subsequent loads (i.e., |
122 // a non-HTTP protocol, e.g. local files. This method is called when response | 120 // when accessing ranges that are outside initial buffered region). |
Ami GONE FROM CHROMIUM
2012/07/09 03:30:57
Old comment made promises about thread of executio
scherkus (not reviewing)
2012/07/10 18:37:27
BRL lives + executes on render thread as do the ca
| |
123 // for initial request is received. | |
124 void NonHttpInitialStartCallback(BufferedResourceLoader::Status status); | |
125 | |
126 // Callback method to be passed to BufferedResourceLoader during range | |
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 | |
129 // BufferedResourceLoader lives, i.e. render thread. | |
130 void PartialReadStartCallback(BufferedResourceLoader::Status status); | 121 void PartialReadStartCallback(BufferedResourceLoader::Status status); |
131 | 122 |
132 // Read callback for BufferedResourceLoader. | 123 // BufferedResourceLoader callbacks. |
133 void ReadCallback(BufferedResourceLoader::Status status, int bytes_read); | 124 void ReadCallback(BufferedResourceLoader::Status status, int bytes_read); |
134 | 125 void LoadingCallback(BufferedResourceLoader::LoadingState state); |
135 // Loading and progress callbacks for HTTP resources. | 126 void ProgressCallback(int64 position); |
136 void HttpLoadingCallback(BufferedResourceLoader::LoadingState state); | |
137 void HttpProgressCallback(int64 position); | |
138 | 127 |
139 void UpdateHostState_Locked(); | 128 void UpdateHostState_Locked(); |
140 | 129 |
141 // URL of the resource requested. | 130 // URL of the resource requested. |
142 GURL url_; | 131 GURL url_; |
143 | 132 |
144 // Members for total bytes of the requested object. It is written once on | 133 // Members for total bytes of the requested object. It is written once on |
145 // render thread but may be read from any thread. However reading of this | 134 // render thread but may be read from any thread. However reading of this |
146 // member is guaranteed to happen after it is first written, so we don't | 135 // member is guaranteed to happen after it is first written, so we don't |
147 // need to protect it. | 136 // need to protect it. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 float playback_rate_; | 206 float playback_rate_; |
218 | 207 |
219 scoped_refptr<media::MediaLog> media_log_; | 208 scoped_refptr<media::MediaLog> media_log_; |
220 | 209 |
221 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); | 210 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); |
222 }; | 211 }; |
223 | 212 |
224 } // namespace webkit_media | 213 } // namespace webkit_media |
225 | 214 |
226 #endif // WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ | 215 #endif // WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ |
OLD | NEW |