| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/glue/webmediaplayer_impl.h" | 5 #include "webkit/glue/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 NewCallback(proxy_.get(), | 367 NewCallback(proxy_.get(), |
| 368 &WebMediaPlayerImpl::Proxy::PipelineEndedCallback), | 368 &WebMediaPlayerImpl::Proxy::PipelineEndedCallback), |
| 369 NewCallback(proxy_.get(), | 369 NewCallback(proxy_.get(), |
| 370 &WebMediaPlayerImpl::Proxy::PipelineErrorCallback), | 370 &WebMediaPlayerImpl::Proxy::PipelineErrorCallback), |
| 371 NewCallback(proxy_.get(), | 371 NewCallback(proxy_.get(), |
| 372 &WebMediaPlayerImpl::Proxy::NetworkEventCallback)); | 372 &WebMediaPlayerImpl::Proxy::NetworkEventCallback)); |
| 373 | 373 |
| 374 // A simple data source that keeps all data in memory. | 374 // A simple data source that keeps all data in memory. |
| 375 scoped_ptr<media::DataSourceFactory> simple_data_source_factory( | 375 scoped_ptr<media::DataSourceFactory> simple_data_source_factory( |
| 376 SimpleDataSource::CreateFactory(MessageLoop::current(), frame, | 376 SimpleDataSource::CreateFactory(MessageLoop::current(), frame, |
| 377 media_log_, |
| 377 proxy_->GetBuildObserver())); | 378 proxy_->GetBuildObserver())); |
| 378 | 379 |
| 379 // A sophisticated data source that does memory caching. | 380 // A sophisticated data source that does memory caching. |
| 380 scoped_ptr<media::DataSourceFactory> buffered_data_source_factory( | 381 scoped_ptr<media::DataSourceFactory> buffered_data_source_factory( |
| 381 BufferedDataSource::CreateFactory(MessageLoop::current(), frame, | 382 BufferedDataSource::CreateFactory(MessageLoop::current(), frame, |
| 383 media_log_, |
| 382 proxy_->GetBuildObserver())); | 384 proxy_->GetBuildObserver())); |
| 383 | 385 |
| 384 scoped_ptr<media::CompositeDataSourceFactory> data_source_factory( | 386 scoped_ptr<media::CompositeDataSourceFactory> data_source_factory( |
| 385 new media::CompositeDataSourceFactory()); | 387 new media::CompositeDataSourceFactory()); |
| 386 | 388 |
| 387 if (use_simple_data_source) { | 389 if (use_simple_data_source) { |
| 388 data_source_factory->AddFactory(simple_data_source_factory.release()); | 390 data_source_factory->AddFactory(simple_data_source_factory.release()); |
| 389 data_source_factory->AddFactory(buffered_data_source_factory.release()); | 391 data_source_factory->AddFactory(buffered_data_source_factory.release()); |
| 390 } else { | 392 } else { |
| 391 data_source_factory->AddFactory(buffered_data_source_factory.release()); | 393 data_source_factory->AddFactory(buffered_data_source_factory.release()); |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 } | 1045 } |
| 1044 } | 1046 } |
| 1045 | 1047 |
| 1046 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { | 1048 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { |
| 1047 DCHECK(MessageLoop::current() == main_loop_); | 1049 DCHECK(MessageLoop::current() == main_loop_); |
| 1048 DCHECK(client_); | 1050 DCHECK(client_); |
| 1049 return client_; | 1051 return client_; |
| 1050 } | 1052 } |
| 1051 | 1053 |
| 1052 } // namespace webkit_glue | 1054 } // namespace webkit_glue |
| OLD | NEW |