| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/media/webmediaplayer_impl.h" | 5 #include "webkit/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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 main_loop_, frame_, media_log_, base::Bind( | 287 main_loop_, frame_, media_log_, base::Bind( |
| 288 &WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr())); | 288 &WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr())); |
| 289 data_source_->Initialize( | 289 data_source_->Initialize( |
| 290 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), | 290 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), |
| 291 base::Bind( | 291 base::Bind( |
| 292 &WebMediaPlayerImpl::DataSourceInitialized, | 292 &WebMediaPlayerImpl::DataSourceInitialized, |
| 293 AsWeakPtr(), gurl)); | 293 AsWeakPtr(), gurl)); |
| 294 | 294 |
| 295 is_local_source_ = !gurl.SchemeIs("http") && !gurl.SchemeIs("https"); | 295 is_local_source_ = !gurl.SchemeIs("http") && !gurl.SchemeIs("https"); |
| 296 | 296 |
| 297 BuildDefaultCollection(data_source_, | 297 BuildDefaultCollection( |
| 298 media_thread_.message_loop_proxy(), | 298 data_source_, |
| 299 filter_collection_.get()); | 299 media_thread_.message_loop_proxy(), |
| 300 filter_collection_.get(), |
| 301 BIND_TO_RENDER_LOOP_2(&WebMediaPlayerImpl::OnNeedKey, "", "")); |
| 300 } | 302 } |
| 301 | 303 |
| 302 void WebMediaPlayerImpl::cancelLoad() { | 304 void WebMediaPlayerImpl::cancelLoad() { |
| 303 DCHECK(main_loop_->BelongsToCurrentThread()); | 305 DCHECK(main_loop_->BelongsToCurrentThread()); |
| 304 } | 306 } |
| 305 | 307 |
| 306 void WebMediaPlayerImpl::play() { | 308 void WebMediaPlayerImpl::play() { |
| 307 DCHECK(main_loop_->BelongsToCurrentThread()); | 309 DCHECK(main_loop_->BelongsToCurrentThread()); |
| 308 | 310 |
| 309 paused_ = false; | 311 paused_ = false; |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 | 1228 |
| 1227 if (pending_repaint_) | 1229 if (pending_repaint_) |
| 1228 return; | 1230 return; |
| 1229 | 1231 |
| 1230 pending_repaint_ = true; | 1232 pending_repaint_ = true; |
| 1231 main_loop_->PostTask(FROM_HERE, base::Bind( | 1233 main_loop_->PostTask(FROM_HERE, base::Bind( |
| 1232 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1234 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
| 1233 } | 1235 } |
| 1234 | 1236 |
| 1235 } // namespace webkit_media | 1237 } // namespace webkit_media |
| OLD | NEW |