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 "third_party/mojo/src/mojo/public/cpp/application/connect.h" | 14 #include "mojo/application/public/cpp/connect.h" |
| 15 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
15 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_impl.h" | 16 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_impl.h" |
16 #include "third_party/mojo/src/mojo/public/interfaces/application/service_provid
er.mojom.h" | |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 | 19 |
20 MojoRendererImpl::MojoRendererImpl( | 20 MojoRendererImpl::MojoRendererImpl( |
21 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 21 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
22 mojo::MediaRendererPtr remote_media_renderer) | 22 mojo::MediaRendererPtr remote_media_renderer) |
23 : task_runner_(task_runner), | 23 : task_runner_(task_runner), |
24 remote_media_renderer_(remote_media_renderer.Pass()), | 24 remote_media_renderer_(remote_media_renderer.Pass()), |
25 binding_(this), | 25 binding_(this), |
26 weak_factory_(this) { | 26 weak_factory_(this) { |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 } | 197 } |
198 | 198 |
199 void MojoRendererImpl::OnInitialized() { | 199 void MojoRendererImpl::OnInitialized() { |
200 DVLOG(1) << __FUNCTION__; | 200 DVLOG(1) << __FUNCTION__; |
201 DCHECK(task_runner_->BelongsToCurrentThread()); | 201 DCHECK(task_runner_->BelongsToCurrentThread()); |
202 if (!init_cb_.is_null()) | 202 if (!init_cb_.is_null()) |
203 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK); | 203 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK); |
204 } | 204 } |
205 | 205 |
206 } // namespace media | 206 } // namespace media |
OLD | NEW |