| 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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/mojo/interfaces/service_factory.mojom.h" | 10 #include "media/mojo/interfaces/service_factory.mojom.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // interfaces::ServiceFactory implementation. | 41 // interfaces::ServiceFactory implementation. |
| 42 void CreateAudioDecoder( | 42 void CreateAudioDecoder( |
| 43 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final; | 43 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final; |
| 44 void CreateRenderer( | 44 void CreateRenderer( |
| 45 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; | 45 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; |
| 46 void CreateCdm( | 46 void CreateCdm( |
| 47 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; | 47 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 #if defined(ENABLE_MOJO_RENDERER) |
| 50 RendererFactory* GetRendererFactory(); | 51 RendererFactory* GetRendererFactory(); |
| 52 |
| 53 scoped_ptr<RendererFactory> renderer_factory_; |
| 54 #endif // defined(ENABLE_MOJO_RENDERER) |
| 55 |
| 56 #if defined(ENABLE_MOJO_CDM) |
| 51 CdmFactory* GetCdmFactory(); | 57 CdmFactory* GetCdmFactory(); |
| 52 | 58 |
| 59 scoped_ptr<CdmFactory> cdm_factory_; |
| 60 #endif // defined(ENABLE_MOJO_CDM) |
| 61 |
| 53 MojoCdmServiceContext cdm_service_context_; | 62 MojoCdmServiceContext cdm_service_context_; |
| 54 | |
| 55 mojo::StrongBinding<interfaces::ServiceFactory> binding_; | 63 mojo::StrongBinding<interfaces::ServiceFactory> binding_; |
| 56 mojo::shell::mojom::InterfaceProvider* interfaces_; | 64 mojo::shell::mojom::InterfaceProvider* interfaces_; |
| 57 scoped_refptr<MediaLog> media_log_; | 65 scoped_refptr<MediaLog> media_log_; |
| 58 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount_; | 66 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount_; |
| 59 MojoMediaClient* mojo_media_client_; | 67 MojoMediaClient* mojo_media_client_; |
| 60 | 68 |
| 61 scoped_ptr<RendererFactory> renderer_factory_; | |
| 62 scoped_ptr<CdmFactory> cdm_factory_; | |
| 63 | |
| 64 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); | 69 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); |
| 65 }; | 70 }; |
| 66 | 71 |
| 67 } // namespace media | 72 } // namespace media |
| 68 | 73 |
| 69 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 74 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| OLD | NEW |