OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 5 #ifndef MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
6 #define MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 6 #define MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // This variable holds the value of the preload attribute for the video | 224 // This variable holds the value of the preload attribute for the video |
225 // element. | 225 // element. |
226 Preload preload_; | 226 Preload preload_; |
227 | 227 |
228 // Bitrate of the content, 0 if unknown. | 228 // Bitrate of the content, 0 if unknown. |
229 int bitrate_; | 229 int bitrate_; |
230 | 230 |
231 // Current playback rate. | 231 // Current playback rate. |
232 double playback_rate_; | 232 double playback_rate_; |
233 | 233 |
234 scoped_refptr<MediaLog> media_log_; | 234 MediaLog* media_log_; |
235 | 235 |
236 // Host object to report buffered byte range changes to. | 236 // Host object to report buffered byte range changes to. |
237 BufferedDataSourceHost* host_; | 237 BufferedDataSourceHost* host_; |
238 | 238 |
239 DownloadingCB downloading_cb_; | 239 DownloadingCB downloading_cb_; |
240 | 240 |
241 // The original URL of the first response. If the request is redirected to | 241 // The original URL of the first response. If the request is redirected to |
242 // another URL it is the URL after redirected. If the response is generated in | 242 // another URL it is the URL after redirected. If the response is generated in |
243 // a Service Worker this URL is empty. MultibufferDataSource checks the | 243 // a Service Worker this URL is empty. MultibufferDataSource checks the |
244 // original URL of each successive response. If the origin URL of it is | 244 // original URL of each successive response. If the origin URL of it is |
245 // different from the original URL of the first response, it is treated | 245 // different from the original URL of the first response, it is treated |
246 // as an error. | 246 // as an error. |
247 GURL response_original_url_; | 247 GURL response_original_url_; |
248 | 248 |
249 // Disallow rebinding WeakReference ownership to a different thread by keeping | 249 // Disallow rebinding WeakReference ownership to a different thread by keeping |
250 // a persistent reference. This avoids problems with the thread-safety of | 250 // a persistent reference. This avoids problems with the thread-safety of |
251 // reaching into this class from multiple threads to attain a WeakPtr. | 251 // reaching into this class from multiple threads to attain a WeakPtr. |
252 base::WeakPtr<MultibufferDataSource> weak_ptr_; | 252 base::WeakPtr<MultibufferDataSource> weak_ptr_; |
253 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; | 253 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; |
254 | 254 |
255 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); | 255 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); |
256 }; | 256 }; |
257 | 257 |
258 } // namespace media | 258 } // namespace media |
259 | 259 |
260 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 260 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
OLD | NEW |