| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_MOJO_MEDIA_CLIENT_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_TEST_MOJO_MEDIA_CLIENT_H_ |
| 6 #define MEDIA_MOJO_SERVICES_TEST_MOJO_MEDIA_CLIENT_H_ | 6 #define MEDIA_MOJO_SERVICES_TEST_MOJO_MEDIA_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "media/audio/fake_audio_log_factory.h" | 11 #include "media/audio/audio_manager.h" |
| 12 #include "media/mojo/services/mojo_media_client.h" | 12 #include "media/mojo/services/mojo_media_client.h" |
| 13 | 13 |
| 14 namespace media { | 14 namespace media { |
| 15 | 15 |
| 16 class AudioHardwareConfig; | 16 class AudioHardwareConfig; |
| 17 class AudioRendererSink; | 17 class AudioRendererSink; |
| 18 class VideoRendererSink; | 18 class VideoRendererSink; |
| 19 | 19 |
| 20 // Default MojoMediaClient for MojoMediaApplication. | 20 // Default MojoMediaClient for MojoMediaApplication. |
| 21 class TestMojoMediaClient : public MojoMediaClient { | 21 class TestMojoMediaClient : public MojoMediaClient { |
| 22 public: | 22 public: |
| 23 TestMojoMediaClient(); | 23 TestMojoMediaClient(); |
| 24 ~TestMojoMediaClient() final; | 24 ~TestMojoMediaClient() final; |
| 25 | 25 |
| 26 // MojoMediaClient implementation. | 26 // MojoMediaClient implementation. |
| 27 void Initialize() final; | 27 void Initialize() final; |
| 28 scoped_ptr<RendererFactory> CreateRendererFactory( | 28 scoped_ptr<RendererFactory> CreateRendererFactory( |
| 29 const scoped_refptr<MediaLog>& media_log) final; | 29 const scoped_refptr<MediaLog>& media_log) final; |
| 30 AudioRendererSink* CreateAudioRendererSink() final; | 30 AudioRendererSink* CreateAudioRendererSink() final; |
| 31 VideoRendererSink* CreateVideoRendererSink( | 31 VideoRendererSink* CreateVideoRendererSink( |
| 32 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) final; | 32 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) final; |
| 33 scoped_ptr<CdmFactory> CreateCdmFactory( | 33 scoped_ptr<CdmFactory> CreateCdmFactory( |
| 34 mojo::shell::mojom::InterfaceProvider* /* interface_provider */) final; | 34 mojo::shell::mojom::InterfaceProvider* /* interface_provider */) final; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 FakeAudioLogFactory fake_audio_log_factory_; | 37 ScopedAudioManagerPtr audio_manager_; |
| 38 scoped_ptr<AudioHardwareConfig> audio_hardware_config_; | 38 scoped_ptr<AudioHardwareConfig> audio_hardware_config_; |
| 39 scoped_refptr<AudioRendererSink> audio_renderer_sink_; | 39 scoped_refptr<AudioRendererSink> audio_renderer_sink_; |
| 40 scoped_ptr<VideoRendererSink> video_renderer_sink_; | 40 scoped_ptr<VideoRendererSink> video_renderer_sink_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(TestMojoMediaClient); | 42 DISALLOW_COPY_AND_ASSIGN(TestMojoMediaClient); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace media | 45 } // namespace media |
| 46 | 46 |
| 47 #endif // MEDIA_MOJO_SERVICES_TEST_MOJO_MEDIA_CLIENT_H_ | 47 #endif // MEDIA_MOJO_SERVICES_TEST_MOJO_MEDIA_CLIENT_H_ |
| OLD | NEW |