OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/service_factory_impl.h" | 5 #include "media/mojo/services/service_factory_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "media/base/cdm_factory.h" | 8 #include "media/base/cdm_factory.h" |
9 #include "media/base/media_log.h" | 9 #include "media/base/media_log.h" |
10 #include "media/base/renderer_factory.h" | 10 #include "media/base/renderer_factory.h" |
11 #include "media/mojo/services/mojo_cdm_service.h" | 11 #include "media/mojo/services/mojo_cdm_service.h" |
12 #include "media/mojo/services/mojo_media_client.h" | 12 #include "media/mojo/services/mojo_media_client.h" |
13 #include "media/mojo/services/mojo_renderer_service.h" | 13 #include "media/mojo/services/mojo_renderer_service.h" |
14 #include "mojo/application/public/cpp/app_lifetime_helper.h" | 14 #include "mojo/shell/public/cpp/app_lifetime_helper.h" |
15 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 15 #include "mojo/shell/public/interfaces/service_provider.mojom.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 ServiceFactoryImpl::ServiceFactoryImpl( | 19 ServiceFactoryImpl::ServiceFactoryImpl( |
20 mojo::InterfaceRequest<interfaces::ServiceFactory> request, | 20 mojo::InterfaceRequest<interfaces::ServiceFactory> request, |
21 mojo::ServiceProvider* service_provider, | 21 mojo::ServiceProvider* service_provider, |
22 scoped_refptr<MediaLog> media_log, | 22 scoped_refptr<MediaLog> media_log, |
23 scoped_ptr<mojo::AppRefCount> parent_app_refcount, | 23 scoped_ptr<mojo::AppRefCount> parent_app_refcount, |
24 MojoMediaClient* mojo_media_client) | 24 MojoMediaClient* mojo_media_client) |
25 : binding_(this, std::move(request)), | 25 : binding_(this, std::move(request)), |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return renderer_factory_.get(); | 65 return renderer_factory_.get(); |
66 } | 66 } |
67 | 67 |
68 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { | 68 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { |
69 if (!cdm_factory_) | 69 if (!cdm_factory_) |
70 cdm_factory_ = mojo_media_client_->CreateCdmFactory(service_provider_); | 70 cdm_factory_ = mojo_media_client_->CreateCdmFactory(service_provider_); |
71 return cdm_factory_.get(); | 71 return cdm_factory_.get(); |
72 } | 72 } |
73 | 73 |
74 } // namespace media | 74 } // namespace media |
OLD | NEW |