| 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 21 matching lines...) Expand all Loading... |
| 32 class ServiceFactoryImpl : public interfaces::ServiceFactory { | 32 class ServiceFactoryImpl : public interfaces::ServiceFactory { |
| 33 public: | 33 public: |
| 34 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request, | 34 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request, |
| 35 mojo::shell::mojom::InterfaceProvider* interfaces, | 35 mojo::shell::mojom::InterfaceProvider* interfaces, |
| 36 scoped_refptr<MediaLog> media_log, | 36 scoped_refptr<MediaLog> media_log, |
| 37 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount, | 37 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount, |
| 38 MojoMediaClient* mojo_media_client); | 38 MojoMediaClient* mojo_media_client); |
| 39 ~ServiceFactoryImpl() final; | 39 ~ServiceFactoryImpl() final; |
| 40 | 40 |
| 41 // interfaces::ServiceFactory implementation. | 41 // interfaces::ServiceFactory implementation. |
| 42 void CreateAudioDecoder( |
| 43 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final; |
| 42 void CreateRenderer( | 44 void CreateRenderer( |
| 43 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; | 45 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; |
| 44 void CreateCdm( | 46 void CreateCdm( |
| 45 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; | 47 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; |
| 46 | 48 |
| 47 private: | 49 private: |
| 48 RendererFactory* GetRendererFactory(); | 50 RendererFactory* GetRendererFactory(); |
| 49 CdmFactory* GetCdmFactory(); | 51 CdmFactory* GetCdmFactory(); |
| 50 | 52 |
| 51 MojoCdmServiceContext cdm_service_context_; | 53 MojoCdmServiceContext cdm_service_context_; |
| 52 | 54 |
| 53 mojo::StrongBinding<interfaces::ServiceFactory> binding_; | 55 mojo::StrongBinding<interfaces::ServiceFactory> binding_; |
| 54 mojo::shell::mojom::InterfaceProvider* interfaces_; | 56 mojo::shell::mojom::InterfaceProvider* interfaces_; |
| 55 scoped_refptr<MediaLog> media_log_; | 57 scoped_refptr<MediaLog> media_log_; |
| 56 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount_; | 58 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount_; |
| 57 MojoMediaClient* mojo_media_client_; | 59 MojoMediaClient* mojo_media_client_; |
| 58 | 60 |
| 59 scoped_ptr<RendererFactory> renderer_factory_; | 61 scoped_ptr<RendererFactory> renderer_factory_; |
| 60 scoped_ptr<CdmFactory> cdm_factory_; | 62 scoped_ptr<CdmFactory> cdm_factory_; |
| 61 | 63 |
| 62 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); | 64 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace media | 67 } // namespace media |
| 66 | 68 |
| 67 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 69 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| OLD | NEW |