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 #include "media/mojo/services/mojo_media_application_factory.h" | 5 #include "media/mojo/services/mojo_media_application_factory.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "media/mojo/services/mojo_media_application.h" | 8 #include "media/mojo/services/mojo_media_application.h" |
9 | 9 |
10 #if defined(ENABLE_TEST_MOJO_MEDIA_CLIENT) | 10 #if defined(ENABLE_TEST_MOJO_MEDIA_CLIENT) |
11 #include "media/mojo/services/test_mojo_media_client.h" // nogncheck | 11 #include "media/mojo/services/test_mojo_media_client.h" // nogncheck |
12 using DefaultClient = media::TestMojoMediaClient; | 12 using DefaultClient = media::TestMojoMediaClient; |
13 #elif defined(OS_ANDROID) | 13 #elif defined(OS_ANDROID) |
14 #include "media/mojo/services/android_mojo_media_client.h" // nogncheck | 14 #include "media/mojo/services/android_mojo_media_client.h" // nogncheck |
15 using DefaultClient = media::AndroidMojoMediaClient; | 15 using DefaultClient = media::AndroidMojoMediaClient; |
16 #else | 16 #else |
17 #include "media/mojo/services/default_mojo_media_client.h" // nogncheck | 17 #include "media/mojo/services/default_mojo_media_client.h" // nogncheck |
18 using DefaultClient = media::DefaultMojoMediaClient; | 18 using DefaultClient = media::DefaultMojoMediaClient; |
19 #endif | 19 #endif |
20 | 20 |
21 namespace media { | 21 namespace media { |
22 | 22 |
23 // static | 23 // static |
24 std::unique_ptr<shell::Service> CreateMojoMediaApplication( | 24 std::unique_ptr<shell::Service> CreateMojoMediaApplication( |
25 const base::Closure& quit_closure) { | 25 const base::Closure& quit_closure) { |
26 return std::unique_ptr<shell::Service>(new MojoMediaApplication( | 26 return std::unique_ptr<shell::Service>(new MojoMediaApplication( |
27 base::WrapUnique(new DefaultClient()), quit_closure)); | 27 base::MakeUnique<DefaultClient>(), quit_closure)); |
28 } | 28 } |
29 | 29 |
30 } // namespace media | 30 } // namespace media |
OLD | NEW |