| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_MEDIA_SERVICE_FACTORY_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MEDIA_SERVICE_FACTORY_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MEDIA_SERVICE_FACTORY_H_ | 6 #define MEDIA_MOJO_SERVICES_MEDIA_SERVICE_FACTORY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/single_thread_task_runner.h" |
| 11 #include "media/mojo/services/media_mojo_export.h" | 12 #include "media/mojo/services/media_mojo_export.h" |
| 12 #include "services/service_manager/public/cpp/service.h" | 13 #include "services/service_manager/public/cpp/service.h" |
| 13 | 14 |
| 14 namespace media { | 15 namespace media { |
| 15 | 16 |
| 17 class MediaGpuChannelManager; |
| 18 |
| 16 // Creates a MediaService instance using the default MojoMediaClient on each | 19 // Creates a MediaService instance using the default MojoMediaClient on each |
| 17 // platform. Uses the TestMojoMediaClient if |enable_test_mojo_media_client| is | 20 // platform. Uses the TestMojoMediaClient if |enable_test_mojo_media_client| is |
| 18 // true. | 21 // true. |
| 19 std::unique_ptr<service_manager::Service> MEDIA_MOJO_EXPORT | 22 std::unique_ptr<service_manager::Service> MEDIA_MOJO_EXPORT |
| 20 CreateMediaService(); | 23 CreateMediaService(); |
| 21 | 24 |
| 25 // Creates a MediaService instance using the GpuMojoMediaClient. |
| 26 std::unique_ptr<service_manager::Service> MEDIA_MOJO_EXPORT |
| 27 CreateGpuMediaService( |
| 28 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner, |
| 29 MediaGpuChannelManager* media_gpu_channel_manager); |
| 30 |
| 22 // Creates a MediaService instance using the TestMojoMediaClient. | 31 // Creates a MediaService instance using the TestMojoMediaClient. |
| 23 std::unique_ptr<service_manager::Service> MEDIA_MOJO_EXPORT | 32 std::unique_ptr<service_manager::Service> MEDIA_MOJO_EXPORT |
| 24 CreateMediaServiceForTesting(); | 33 CreateMediaServiceForTesting(); |
| 25 | 34 |
| 26 } // namespace media | 35 } // namespace media |
| 27 | 36 |
| 28 #endif // MEDIA_MOJO_SERVICES_MEDIA_SERVICE_FACTORY_H_ | 37 #endif // MEDIA_MOJO_SERVICES_MEDIA_SERVICE_FACTORY_H_ |
| OLD | NEW |