| 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 #ifndef MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| 6 #define MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 6 #define MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "media/mojo/interfaces/service_factory.mojom.h" | 9 #include "media/mojo/interfaces/service_factory.mojom.h" |
| 10 #include "media/mojo/services/mojo_cdm_service_context.h" | 10 #include "media/mojo/services/mojo_cdm_service_context.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class ServiceFactoryImpl : public interfaces::ServiceFactory { | 23 class ServiceFactoryImpl : public interfaces::ServiceFactory { |
| 24 public: | 24 public: |
| 25 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request, | 25 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request, |
| 26 mojo::ServiceProvider* service_provider, | 26 mojo::ServiceProvider* service_provider, |
| 27 scoped_refptr<MediaLog> media_log); | 27 scoped_refptr<MediaLog> media_log); |
| 28 ~ServiceFactoryImpl() final; | 28 ~ServiceFactoryImpl() final; |
| 29 | 29 |
| 30 // interfaces::ServiceFactory implementation. | 30 // interfaces::ServiceFactory implementation. |
| 31 void CreateRenderer( | 31 void CreateRenderer( |
| 32 mojo::InterfaceRequest<interfaces::MediaRenderer> renderer) final; | 32 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; |
| 33 void CreateCdm( | 33 void CreateCdm( |
| 34 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; | 34 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 RendererFactory* GetRendererFactory(); | 37 RendererFactory* GetRendererFactory(); |
| 38 CdmFactory* GetCdmFactory(); | 38 CdmFactory* GetCdmFactory(); |
| 39 | 39 |
| 40 MojoCdmServiceContext cdm_service_context_; | 40 MojoCdmServiceContext cdm_service_context_; |
| 41 | 41 |
| 42 mojo::StrongBinding<interfaces::ServiceFactory> binding_; | 42 mojo::StrongBinding<interfaces::ServiceFactory> binding_; |
| 43 mojo::ServiceProvider* service_provider_; | 43 mojo::ServiceProvider* service_provider_; |
| 44 scoped_refptr<MediaLog> media_log_; | 44 scoped_refptr<MediaLog> media_log_; |
| 45 | 45 |
| 46 scoped_ptr<RendererFactory> renderer_factory_; | 46 scoped_ptr<RendererFactory> renderer_factory_; |
| 47 scoped_ptr<CdmFactory> cdm_factory_; | 47 scoped_ptr<CdmFactory> cdm_factory_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); | 49 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace media | 52 } // namespace media |
| 53 | 53 |
| 54 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 54 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| OLD | NEW |