| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class ServiceFactoryImpl : public interfaces::ServiceFactory { | 33 class ServiceFactoryImpl : public interfaces::ServiceFactory { |
| 34 public: | 34 public: |
| 35 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request, | 35 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request, |
| 36 shell::mojom::InterfaceProvider* interfaces, | 36 shell::mojom::InterfaceProvider* interfaces, |
| 37 scoped_refptr<MediaLog> media_log, | 37 scoped_refptr<MediaLog> media_log, |
| 38 std::unique_ptr<shell::MessageLoopRef> parent_app_refcount, | 38 std::unique_ptr<shell::MessageLoopRef> parent_app_refcount, |
| 39 MojoMediaClient* mojo_media_client); | 39 MojoMediaClient* mojo_media_client); |
| 40 ~ServiceFactoryImpl() final; | 40 ~ServiceFactoryImpl() final; |
| 41 | 41 |
| 42 // interfaces::ServiceFactory implementation. | 42 // interfaces::ServiceFactory implementation. |
| 43 void CreateAudioDecoder( | 43 void CreateAudioDecoder(interfaces::AudioDecoderRequest request) final; |
| 44 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final; | 44 void CreateVideoDecoder(interfaces::VideoDecoderRequest request) final; |
| 45 void CreateRenderer( | 45 void CreateRenderer(interfaces::RendererRequest request) final; |
| 46 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; | 46 void CreateCdm(interfaces::ContentDecryptionModuleRequest request) final; |
| 47 void CreateCdm( | |
| 48 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; | |
| 49 | 47 |
| 50 private: | 48 private: |
| 51 #if defined(ENABLE_MOJO_RENDERER) | 49 #if defined(ENABLE_MOJO_RENDERER) |
| 52 RendererFactory* GetRendererFactory(); | 50 RendererFactory* GetRendererFactory(); |
| 53 | 51 |
| 54 std::unique_ptr<RendererFactory> renderer_factory_; | 52 std::unique_ptr<RendererFactory> renderer_factory_; |
| 55 #endif // defined(ENABLE_MOJO_RENDERER) | 53 #endif // defined(ENABLE_MOJO_RENDERER) |
| 56 | 54 |
| 57 #if defined(ENABLE_MOJO_CDM) | 55 #if defined(ENABLE_MOJO_CDM) |
| 58 CdmFactory* GetCdmFactory(); | 56 CdmFactory* GetCdmFactory(); |
| 59 | 57 |
| 60 std::unique_ptr<CdmFactory> cdm_factory_; | 58 std::unique_ptr<CdmFactory> cdm_factory_; |
| 61 #endif // defined(ENABLE_MOJO_CDM) | 59 #endif // defined(ENABLE_MOJO_CDM) |
| 62 | 60 |
| 63 MojoCdmServiceContext cdm_service_context_; | 61 MojoCdmServiceContext cdm_service_context_; |
| 64 mojo::StrongBinding<interfaces::ServiceFactory> binding_; | 62 mojo::StrongBinding<interfaces::ServiceFactory> binding_; |
| 65 shell::mojom::InterfaceProvider* interfaces_; | 63 shell::mojom::InterfaceProvider* interfaces_; |
| 66 scoped_refptr<MediaLog> media_log_; | 64 scoped_refptr<MediaLog> media_log_; |
| 67 std::unique_ptr<shell::MessageLoopRef> parent_app_refcount_; | 65 std::unique_ptr<shell::MessageLoopRef> parent_app_refcount_; |
| 68 MojoMediaClient* mojo_media_client_; | 66 MojoMediaClient* mojo_media_client_; |
| 69 | 67 |
| 70 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); | 68 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); |
| 71 }; | 69 }; |
| 72 | 70 |
| 73 } // namespace media | 71 } // namespace media |
| 74 | 72 |
| 75 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 73 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| OLD | NEW |