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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
299 media_log_->AddEvent(media_log_->CreateLoadEvent(url.spec())); | 299 media_log_->AddEvent(media_log_->CreateLoadEvent(url.spec())); |
300 | 300 |
301 // Media source pipelines can start immediately. | 301 // Media source pipelines can start immediately. |
302 if (load_type == LoadTypeMediaSource) { | 302 if (load_type == LoadTypeMediaSource) { |
303 supports_save_ = false; | 303 supports_save_ = false; |
304 StartPipeline(); | 304 StartPipeline(); |
305 return; | 305 return; |
306 } | 306 } |
307 | 307 |
308 // Otherwise it's a regular request which requires resolving the URL first. | 308 // Otherwise it's a regular request which requires resolving the URL first. |
309 // TODO(sandersd): Make WMPI a DataSourceHost and pass &this instead of | |
scherkus (not reviewing)
2014/03/28 20:54:09
nit: &this would be a WMPI** -- you probably mean
sandersd (OOO until July 31)
2014/03/28 21:14:28
Done.
| |
310 // &pipeline_. | |
309 data_source_.reset(new BufferedDataSource( | 311 data_source_.reset(new BufferedDataSource( |
310 main_loop_, | 312 main_loop_, |
311 frame_, | 313 frame_, |
312 media_log_.get(), | 314 media_log_.get(), |
315 &pipeline_, | |
313 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); | 316 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); |
314 data_source_->Initialize( | 317 data_source_->Initialize( |
315 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), | 318 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), |
316 base::Bind( | 319 base::Bind( |
317 &WebMediaPlayerImpl::DataSourceInitialized, | 320 &WebMediaPlayerImpl::DataSourceInitialized, |
318 AsWeakPtr(), gurl)); | 321 AsWeakPtr(), gurl)); |
319 | 322 |
320 is_local_source_ = !gurl.SchemeIsHTTPOrHTTPS(); | 323 is_local_source_ = !gurl.SchemeIsHTTPOrHTTPS(); |
321 } | 324 } |
322 | 325 |
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1312 | 1315 |
1313 if (web_cdm_) { | 1316 if (web_cdm_) { |
1314 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1317 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
1315 return; | 1318 return; |
1316 } | 1319 } |
1317 | 1320 |
1318 decryptor_ready_cb_ = decryptor_ready_cb; | 1321 decryptor_ready_cb_ = decryptor_ready_cb; |
1319 } | 1322 } |
1320 | 1323 |
1321 } // namespace content | 1324 } // namespace content |
OLD | NEW |