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