OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/media/factory_service/factory_service.h" | 5 #include "services/media/factory_service/factory_service.h" |
| 6 |
| 7 #include "mojo/public/cpp/application/service_provider_impl.h" |
6 #include "services/media/factory_service/media_decoder_impl.h" | 8 #include "services/media/factory_service/media_decoder_impl.h" |
7 #include "services/media/factory_service/media_demux_impl.h" | 9 #include "services/media/factory_service/media_demux_impl.h" |
8 #include "services/media/factory_service/media_player_impl.h" | 10 #include "services/media/factory_service/media_player_impl.h" |
9 #include "services/media/factory_service/media_sink_impl.h" | 11 #include "services/media/factory_service/media_sink_impl.h" |
10 #include "services/media/factory_service/media_source_impl.h" | 12 #include "services/media/factory_service/media_source_impl.h" |
11 #include "services/media/factory_service/media_timeline_controller_impl.h" | 13 #include "services/media/factory_service/media_timeline_controller_impl.h" |
12 #include "services/media/factory_service/network_reader_impl.h" | 14 #include "services/media/factory_service/network_reader_impl.h" |
13 | 15 |
14 namespace mojo { | 16 namespace mojo { |
15 namespace media { | 17 namespace media { |
16 | 18 |
17 MediaFactoryService::MediaFactoryService() {} | 19 MediaFactoryService::MediaFactoryService() {} |
18 | 20 |
19 MediaFactoryService::~MediaFactoryService() {} | 21 MediaFactoryService::~MediaFactoryService() {} |
20 | 22 |
21 bool MediaFactoryService::ConfigureIncomingConnection( | 23 bool MediaFactoryService::OnAcceptConnection( |
22 ServiceProviderImpl* service_provider_impl) { | 24 ServiceProviderImpl* service_provider_impl) { |
23 service_provider_impl->AddService<MediaFactory>( | 25 service_provider_impl->AddService<MediaFactory>( |
24 [this](const ConnectionContext& connection_context, | 26 [this](const ConnectionContext& connection_context, |
25 InterfaceRequest<MediaFactory> media_factory_request) { | 27 InterfaceRequest<MediaFactory> media_factory_request) { |
26 bindings_.AddBinding(this, media_factory_request.Pass()); | 28 bindings_.AddBinding(this, media_factory_request.Pass()); |
27 }); | 29 }); |
28 return true; | 30 return true; |
29 } | 31 } |
30 | 32 |
31 void MediaFactoryService::CreatePlayer(InterfaceHandle<SeekingReader> reader, | 33 void MediaFactoryService::CreatePlayer(InterfaceHandle<SeekingReader> reader, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 68 } |
67 | 69 |
68 void MediaFactoryService::CreateTimelineController( | 70 void MediaFactoryService::CreateTimelineController( |
69 InterfaceRequest<MediaTimelineController> timeline_controller) { | 71 InterfaceRequest<MediaTimelineController> timeline_controller) { |
70 AddProduct( | 72 AddProduct( |
71 MediaTimelineControllerImpl::Create(timeline_controller.Pass(), this)); | 73 MediaTimelineControllerImpl::Create(timeline_controller.Pass(), this)); |
72 } | 74 } |
73 | 75 |
74 } // namespace media | 76 } // namespace media |
75 } // namespace mojo | 77 } // namespace mojo |
OLD | NEW |