| 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 26 matching lines...) Expand all Loading... |
| 37 ~ServiceFactoryImpl() final; | 37 ~ServiceFactoryImpl() final; |
| 38 | 38 |
| 39 // mojom::ServiceFactory implementation. | 39 // mojom::ServiceFactory implementation. |
| 40 void CreateAudioDecoder(mojom::AudioDecoderRequest request) final; | 40 void CreateAudioDecoder(mojom::AudioDecoderRequest request) final; |
| 41 void CreateVideoDecoder(mojom::VideoDecoderRequest request) final; | 41 void CreateVideoDecoder(mojom::VideoDecoderRequest request) final; |
| 42 void CreateRenderer(const mojo::String& audio_device_id, | 42 void CreateRenderer(const mojo::String& audio_device_id, |
| 43 mojom::RendererRequest request) final; | 43 mojom::RendererRequest request) final; |
| 44 void CreateCdm(mojom::ContentDecryptionModuleRequest request) final; | 44 void CreateCdm(mojom::ContentDecryptionModuleRequest request) final; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 #if defined(ENABLE_MOJO_RENDERER) |
| 48 RendererFactory* GetRendererFactory(); |
| 49 #endif // defined(ENABLE_MOJO_RENDERER) |
| 50 |
| 47 #if defined(ENABLE_MOJO_CDM) | 51 #if defined(ENABLE_MOJO_CDM) |
| 48 CdmFactory* GetCdmFactory(); | 52 CdmFactory* GetCdmFactory(); |
| 49 | |
| 50 std::unique_ptr<CdmFactory> cdm_factory_; | |
| 51 #endif // defined(ENABLE_MOJO_CDM) | 53 #endif // defined(ENABLE_MOJO_CDM) |
| 52 | 54 |
| 53 MojoCdmServiceContext cdm_service_context_; | 55 MojoCdmServiceContext cdm_service_context_; |
| 54 mojo::StrongBinding<mojom::ServiceFactory> binding_; | 56 mojo::StrongBinding<mojom::ServiceFactory> binding_; |
| 57 |
| 58 #if defined(ENABLE_MOJO_RENDERER) |
| 59 std::unique_ptr<RendererFactory> renderer_factory_; |
| 60 #endif // defined(ENABLE_MOJO_RENDERER) |
| 61 |
| 55 #if defined(ENABLE_MOJO_CDM) | 62 #if defined(ENABLE_MOJO_CDM) |
| 63 std::unique_ptr<CdmFactory> cdm_factory_; |
| 56 shell::mojom::InterfaceProviderPtr interfaces_; | 64 shell::mojom::InterfaceProviderPtr interfaces_; |
| 57 #endif | 65 #endif // defined(ENABLE_MOJO_CDM) |
| 58 | 66 |
| 59 scoped_refptr<MediaLog> media_log_; | 67 scoped_refptr<MediaLog> media_log_; |
| 60 std::unique_ptr<shell::ServiceContextRef> connection_ref_; | 68 std::unique_ptr<shell::ServiceContextRef> connection_ref_; |
| 61 MojoMediaClient* mojo_media_client_; | 69 MojoMediaClient* mojo_media_client_; |
| 62 | 70 |
| 63 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); | 71 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); |
| 64 }; | 72 }; |
| 65 | 73 |
| 66 } // namespace media | 74 } // namespace media |
| 67 | 75 |
| 68 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 76 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| OLD | NEW |