| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/mojo/services/mojo_renderer_impl.h" | 5 #include "media/mojo/services/mojo_renderer_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "media/base/bind_to_current_loop.h" | 11 #include "media/base/bind_to_current_loop.h" |
| 12 #include "media/base/demuxer_stream_provider.h" | 12 #include "media/base/demuxer_stream_provider.h" |
| 13 #include "media/mojo/services/mojo_demuxer_stream_impl.h" | 13 #include "media/mojo/services/mojo_demuxer_stream_impl.h" |
| 14 #include "mojo/application/public/cpp/connect.h" | 14 #include "mojo/application/public/cpp/connect.h" |
| 15 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 15 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
| 16 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_impl.h" | |
| 17 | 16 |
| 18 namespace media { | 17 namespace media { |
| 19 | 18 |
| 20 MojoRendererImpl::MojoRendererImpl( | 19 MojoRendererImpl::MojoRendererImpl( |
| 21 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 20 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 22 interfaces::RendererPtr remote_renderer) | 21 interfaces::RendererPtr remote_renderer) |
| 23 : task_runner_(task_runner), | 22 : task_runner_(task_runner), |
| 24 remote_renderer_(remote_renderer.Pass()), | 23 remote_renderer_(remote_renderer.Pass()), |
| 25 binding_(this), | 24 binding_(this), |
| 26 weak_factory_(this) { | 25 weak_factory_(this) { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 void MojoRendererImpl::OnInitialized(bool success) { | 203 void MojoRendererImpl::OnInitialized(bool success) { |
| 205 DVLOG(1) << __FUNCTION__; | 204 DVLOG(1) << __FUNCTION__; |
| 206 DCHECK(task_runner_->BelongsToCurrentThread()); | 205 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 207 DCHECK(!init_cb_.is_null()); | 206 DCHECK(!init_cb_.is_null()); |
| 208 | 207 |
| 209 base::ResetAndReturn(&init_cb_) | 208 base::ResetAndReturn(&init_cb_) |
| 210 .Run(success ? PIPELINE_OK : PIPELINE_ERROR_INITIALIZATION_FAILED); | 209 .Run(success ? PIPELINE_OK : PIPELINE_ERROR_INITIALIZATION_FAILED); |
| 211 } | 210 } |
| 212 | 211 |
| 213 } // namespace media | 212 } // namespace media |
| OLD | NEW |