Chromium Code Reviews| 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 #include <string> | |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "media/mojo/interfaces/service_factory.mojom.h" | 12 #include "media/mojo/interfaces/service_factory.mojom.h" |
| 12 #include "media/mojo/services/mojo_cdm_service_context.h" | 13 #include "media/mojo/services/mojo_cdm_service_context.h" |
| 13 #include "mojo/public/cpp/bindings/strong_binding.h" | 14 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 14 #include "services/shell/public/cpp/connector.h" | 15 #include "services/shell/public/cpp/connector.h" |
| 15 #include "services/shell/public/cpp/shell_connection_ref.h" | 16 #include "services/shell/public/cpp/shell_connection_ref.h" |
| 16 | 17 |
| 17 namespace shell { | 18 namespace shell { |
| 18 namespace mojom { | 19 namespace mojom { |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 32 ServiceFactoryImpl(mojo::InterfaceRequest<mojom::ServiceFactory> request, | 33 ServiceFactoryImpl(mojo::InterfaceRequest<mojom::ServiceFactory> request, |
| 33 shell::mojom::InterfaceProvider* interfaces, | 34 shell::mojom::InterfaceProvider* interfaces, |
| 34 scoped_refptr<MediaLog> media_log, | 35 scoped_refptr<MediaLog> media_log, |
| 35 std::unique_ptr<shell::ShellConnectionRef> connection_ref, | 36 std::unique_ptr<shell::ShellConnectionRef> connection_ref, |
| 36 MojoMediaClient* mojo_media_client); | 37 MojoMediaClient* mojo_media_client); |
| 37 ~ServiceFactoryImpl() final; | 38 ~ServiceFactoryImpl() final; |
| 38 | 39 |
| 39 // mojom::ServiceFactory implementation. | 40 // mojom::ServiceFactory implementation. |
| 40 void CreateAudioDecoder(mojom::AudioDecoderRequest request) final; | 41 void CreateAudioDecoder(mojom::AudioDecoderRequest request) final; |
| 41 void CreateVideoDecoder(mojom::VideoDecoderRequest request) final; | 42 void CreateVideoDecoder(mojom::VideoDecoderRequest request) final; |
| 42 void CreateRenderer(mojom::RendererRequest request) final; | 43 void CreateRenderer(mojom::RendererRequest request, |
| 44 const std::string& audio_device_id) final; | |
|
xhwang
2016/06/02 21:53:50
Is this what the service_factory.mojom.h file is g
tianyuwang1
2016/06/03 00:21:16
Fixed. service_factory.mojom.h is generating mojo
| |
| 43 void CreateCdm(mojom::ContentDecryptionModuleRequest request) final; | 45 void CreateCdm(mojom::ContentDecryptionModuleRequest request) final; |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 #if defined(ENABLE_MOJO_RENDERER) | |
| 47 RendererFactory* GetRendererFactory(); | |
| 48 | |
| 49 std::unique_ptr<RendererFactory> renderer_factory_; | |
| 50 #endif // defined(ENABLE_MOJO_RENDERER) | |
| 51 | |
| 52 #if defined(ENABLE_MOJO_CDM) | 48 #if defined(ENABLE_MOJO_CDM) |
| 53 CdmFactory* GetCdmFactory(); | 49 CdmFactory* GetCdmFactory(); |
| 54 | 50 |
| 55 std::unique_ptr<CdmFactory> cdm_factory_; | 51 std::unique_ptr<CdmFactory> cdm_factory_; |
| 56 #endif // defined(ENABLE_MOJO_CDM) | 52 #endif // defined(ENABLE_MOJO_CDM) |
| 57 | 53 |
| 58 MojoCdmServiceContext cdm_service_context_; | 54 MojoCdmServiceContext cdm_service_context_; |
| 59 mojo::StrongBinding<mojom::ServiceFactory> binding_; | 55 mojo::StrongBinding<mojom::ServiceFactory> binding_; |
| 60 #if defined(ENABLE_MOJO_CDM) | 56 #if defined(ENABLE_MOJO_CDM) |
| 61 shell::mojom::InterfaceProvider* interfaces_; | 57 shell::mojom::InterfaceProvider* interfaces_; |
| 62 #endif | 58 #endif |
| 63 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_CDM) || \ | 59 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_CDM) || \ |
| 64 defined(ENABLE_MOJO_RENDERER) | 60 defined(ENABLE_MOJO_RENDERER) |
| 65 MojoMediaClient* mojo_media_client_; | 61 MojoMediaClient* mojo_media_client_; |
| 66 #endif | 62 #endif |
| 67 scoped_refptr<MediaLog> media_log_; | 63 scoped_refptr<MediaLog> media_log_; |
| 68 std::unique_ptr<shell::ShellConnectionRef> connection_ref_; | 64 std::unique_ptr<shell::ShellConnectionRef> connection_ref_; |
| 69 | 65 |
| 70 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); | 66 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); |
| 71 }; | 67 }; |
| 72 | 68 |
| 73 } // namespace media | 69 } // namespace media |
| 74 | 70 |
| 75 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ | 71 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ |
| OLD | NEW |