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 "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "media/base/media_log.h" | 9 #include "media/base/media_log.h" |
10 #include "media/mojo/services/mojo_media_client.h" | 10 #include "media/mojo/services/mojo_media_client.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #endif // defined(ENABLE_MOJO_RENDERER) | 27 #endif // defined(ENABLE_MOJO_RENDERER) |
28 | 28 |
29 #if defined(ENABLE_MOJO_CDM) | 29 #if defined(ENABLE_MOJO_CDM) |
30 #include "media/base/cdm_factory.h" | 30 #include "media/base/cdm_factory.h" |
31 #include "media/mojo/services/mojo_cdm_service.h" | 31 #include "media/mojo/services/mojo_cdm_service.h" |
32 #endif // defined(ENABLE_MOJO_CDM) | 32 #endif // defined(ENABLE_MOJO_CDM) |
33 | 33 |
34 namespace media { | 34 namespace media { |
35 | 35 |
36 ServiceFactoryImpl::ServiceFactoryImpl( | 36 ServiceFactoryImpl::ServiceFactoryImpl( |
37 shell::mojom::InterfaceProviderPtr interfaces, | 37 service_manager::mojom::InterfaceProviderPtr interfaces, |
38 scoped_refptr<MediaLog> media_log, | 38 scoped_refptr<MediaLog> media_log, |
39 std::unique_ptr<shell::ServiceContextRef> connection_ref, | 39 std::unique_ptr<service_manager::ServiceContextRef> connection_ref, |
40 MojoMediaClient* mojo_media_client) | 40 MojoMediaClient* mojo_media_client) |
41 : | 41 : |
42 #if defined(ENABLE_MOJO_CDM) | 42 #if defined(ENABLE_MOJO_CDM) |
43 interfaces_(std::move(interfaces)), | 43 interfaces_(std::move(interfaces)), |
44 #endif | 44 #endif |
45 media_log_(media_log), | 45 media_log_(media_log), |
46 connection_ref_(std::move(connection_ref)), | 46 connection_ref_(std::move(connection_ref)), |
47 mojo_media_client_(mojo_media_client) { | 47 mojo_media_client_(mojo_media_client) { |
48 DVLOG(1) << __FUNCTION__; | 48 DVLOG(1) << __FUNCTION__; |
49 DCHECK(mojo_media_client_); | 49 DCHECK(mojo_media_client_); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { | 139 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { |
140 if (!cdm_factory_) { | 140 if (!cdm_factory_) { |
141 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_.get()); | 141 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_.get()); |
142 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available."; | 142 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available."; |
143 } | 143 } |
144 return cdm_factory_.get(); | 144 return cdm_factory_.get(); |
145 } | 145 } |
146 #endif // defined(ENABLE_MOJO_CDM) | 146 #endif // defined(ENABLE_MOJO_CDM) |
147 | 147 |
148 } // namespace media | 148 } // namespace media |
OLD | NEW |