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