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 #include "content/renderer/media/webmediaplayer_impl.h" | 5 #include "content/renderer/media/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 media_log_->AddEvent(media_log_->CreateLoadEvent(url.spec())); | 301 media_log_->AddEvent(media_log_->CreateLoadEvent(url.spec())); |
302 | 302 |
303 // Media source pipelines can start immediately. | 303 // Media source pipelines can start immediately. |
304 if (load_type == LoadTypeMediaSource) { | 304 if (load_type == LoadTypeMediaSource) { |
305 supports_save_ = false; | 305 supports_save_ = false; |
306 StartPipeline(); | 306 StartPipeline(); |
307 return; | 307 return; |
308 } | 308 } |
309 | 309 |
310 // Otherwise it's a regular request which requires resolving the URL first. | 310 // Otherwise it's a regular request which requires resolving the URL first. |
| 311 // TODO(sandersd): Make WMPI a DataSourceHost and pass |this| instead of |
| 312 // |&pipeline_|. |
311 data_source_.reset(new BufferedDataSource( | 313 data_source_.reset(new BufferedDataSource( |
312 main_loop_, | 314 main_loop_, |
313 frame_, | 315 frame_, |
314 media_log_.get(), | 316 media_log_.get(), |
| 317 &pipeline_, |
315 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); | 318 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); |
316 data_source_->Initialize( | 319 data_source_->Initialize( |
317 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), | 320 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), |
318 base::Bind( | 321 base::Bind( |
319 &WebMediaPlayerImpl::DataSourceInitialized, | 322 &WebMediaPlayerImpl::DataSourceInitialized, |
320 AsWeakPtr(), gurl)); | 323 AsWeakPtr(), gurl)); |
321 | 324 |
322 is_local_source_ = !gurl.SchemeIsHTTPOrHTTPS(); | 325 is_local_source_ = !gurl.SchemeIsHTTPOrHTTPS(); |
323 } | 326 } |
324 | 327 |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 | 1320 |
1318 if (web_cdm_) { | 1321 if (web_cdm_) { |
1319 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1322 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
1320 return; | 1323 return; |
1321 } | 1324 } |
1322 | 1325 |
1323 decryptor_ready_cb_ = decryptor_ready_cb; | 1326 decryptor_ready_cb_ = decryptor_ready_cb; |
1324 } | 1327 } |
1325 | 1328 |
1326 } // namespace content | 1329 } // namespace content |
OLD | NEW |