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 15 matching lines...) Expand all Loading... |
26 namespace media { | 26 namespace media { |
27 | 27 |
28 class CdmFactory; | 28 class CdmFactory; |
29 class MediaLog; | 29 class MediaLog; |
30 class MojoMediaClient; | 30 class MojoMediaClient; |
31 class RendererFactory; | 31 class RendererFactory; |
32 | 32 |
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 mojo::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<mojo::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( |
44 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final; | 44 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final; |
45 void CreateRenderer( | 45 void CreateRenderer( |
46 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; | 46 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; |
47 void CreateCdm( | 47 void CreateCdm( |
48 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; | 48 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; |
49 | 49 |
50 private: | 50 private: |
51 #if defined(ENABLE_MOJO_RENDERER) | 51 #if defined(ENABLE_MOJO_RENDERER) |
52 RendererFactory* GetRendererFactory(); | 52 RendererFactory* GetRendererFactory(); |
53 | 53 |
54 std::unique_ptr<RendererFactory> renderer_factory_; | 54 std::unique_ptr<RendererFactory> renderer_factory_; |
55 #endif // defined(ENABLE_MOJO_RENDERER) | 55 #endif // defined(ENABLE_MOJO_RENDERER) |
56 | 56 |
57 #if defined(ENABLE_MOJO_CDM) | 57 #if defined(ENABLE_MOJO_CDM) |
58 CdmFactory* GetCdmFactory(); | 58 CdmFactory* GetCdmFactory(); |
59 | 59 |
60 std::unique_ptr<CdmFactory> cdm_factory_; | 60 std::unique_ptr<CdmFactory> cdm_factory_; |
61 #endif // defined(ENABLE_MOJO_CDM) | 61 #endif // defined(ENABLE_MOJO_CDM) |
62 | 62 |
63 MojoCdmServiceContext cdm_service_context_; | 63 MojoCdmServiceContext cdm_service_context_; |
64 mojo::StrongBinding<interfaces::ServiceFactory> binding_; | 64 mojo::StrongBinding<interfaces::ServiceFactory> binding_; |
65 mojo::shell::mojom::InterfaceProvider* interfaces_; | 65 shell::mojom::InterfaceProvider* interfaces_; |
66 scoped_refptr<MediaLog> media_log_; | 66 scoped_refptr<MediaLog> media_log_; |
67 std::unique_ptr<mojo::MessageLoopRef> parent_app_refcount_; | 67 std::unique_ptr<shell::MessageLoopRef> parent_app_refcount_; |
68 MojoMediaClient* mojo_media_client_; | 68 MojoMediaClient* mojo_media_client_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); | 70 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace media | 73 } // namespace media |
74 | 74 |
75 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 75 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
OLD | NEW |