| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 main_loop_, | 293 main_loop_, |
| 294 frame_, | 294 frame_, |
| 295 media_log_.get(), | 295 media_log_.get(), |
| 296 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); | 296 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); |
| 297 data_source_->Initialize( | 297 data_source_->Initialize( |
| 298 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), | 298 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), |
| 299 base::Bind( | 299 base::Bind( |
| 300 &WebMediaPlayerImpl::DataSourceInitialized, | 300 &WebMediaPlayerImpl::DataSourceInitialized, |
| 301 AsWeakPtr(), gurl)); | 301 AsWeakPtr(), gurl)); |
| 302 | 302 |
| 303 is_local_source_ = !gurl.SchemeIs("http") && !gurl.SchemeIs("https"); | 303 is_local_source_ = !gurl.SchemeIsHttp(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void WebMediaPlayerImpl::play() { | 306 void WebMediaPlayerImpl::play() { |
| 307 DCHECK(main_loop_->BelongsToCurrentThread()); | 307 DCHECK(main_loop_->BelongsToCurrentThread()); |
| 308 | 308 |
| 309 paused_ = false; | 309 paused_ = false; |
| 310 pipeline_->SetPlaybackRate(playback_rate_); | 310 pipeline_->SetPlaybackRate(playback_rate_); |
| 311 | 311 |
| 312 media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PLAY)); | 312 media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PLAY)); |
| 313 | 313 |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 | 1243 |
| 1244 if (pending_repaint_) | 1244 if (pending_repaint_) |
| 1245 return; | 1245 return; |
| 1246 | 1246 |
| 1247 pending_repaint_ = true; | 1247 pending_repaint_ = true; |
| 1248 main_loop_->PostTask(FROM_HERE, base::Bind( | 1248 main_loop_->PostTask(FROM_HERE, base::Bind( |
| 1249 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1249 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 } // namespace content | 1252 } // namespace content |
| OLD | NEW |