| 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/shell/public/interfaces/interface_provider.mojom.h" | 14 #include "mojo/shell/public/interfaces/interface_provider.mojom.h" |
| 15 | 15 |
| 16 namespace media { | 16 namespace media { |
| 17 | 17 |
| 18 ServiceFactoryImpl::ServiceFactoryImpl( | 18 ServiceFactoryImpl::ServiceFactoryImpl( |
| 19 mojo::InterfaceRequest<interfaces::ServiceFactory> request, | 19 mojo::InterfaceRequest<interfaces::ServiceFactory> request, |
| 20 mojo::shell::mojom::InterfaceProvider* interfaces, | 20 mojo::shell::mojom::InterfaceProvider* interfaces, |
| 21 scoped_refptr<MediaLog> media_log, | 21 scoped_refptr<MediaLog> media_log, |
| 22 scoped_ptr<mojo::AppRefCount> parent_app_refcount, | 22 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount, |
| 23 MojoMediaClient* mojo_media_client) | 23 MojoMediaClient* mojo_media_client) |
| 24 : binding_(this, std::move(request)), | 24 : binding_(this, std::move(request)), |
| 25 interfaces_(interfaces), | 25 interfaces_(interfaces), |
| 26 media_log_(media_log), | 26 media_log_(media_log), |
| 27 parent_app_refcount_(std::move(parent_app_refcount)), | 27 parent_app_refcount_(std::move(parent_app_refcount)), |
| 28 mojo_media_client_(mojo_media_client) { | 28 mojo_media_client_(mojo_media_client) { |
| 29 DVLOG(1) << __FUNCTION__; | 29 DVLOG(1) << __FUNCTION__; |
| 30 } | 30 } |
| 31 | 31 |
| 32 ServiceFactoryImpl::~ServiceFactoryImpl() { | 32 ServiceFactoryImpl::~ServiceFactoryImpl() { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { | 83 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { |
| 84 if (!cdm_factory_) { | 84 if (!cdm_factory_) { |
| 85 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_); | 85 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_); |
| 86 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available."; | 86 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available."; |
| 87 } | 87 } |
| 88 return cdm_factory_.get(); | 88 return cdm_factory_.get(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace media | 91 } // namespace media |
| OLD | NEW |