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 #include "media/mojo/services/android_mojo_media_client.h" | 5 #include "media/mojo/services/android_mojo_media_client.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "media/base/android/android_cdm_factory.h" | 8 #include "media/base/android/android_cdm_factory.h" |
9 #include "media/filters/android/media_codec_audio_decoder.h" | 9 #include "media/filters/android/media_codec_audio_decoder.h" |
10 #include "media/mojo/interfaces/provision_fetcher.mojom.h" | 10 #include "media/mojo/interfaces/provision_fetcher.mojom.h" |
11 #include "media/mojo/services/mojo_provision_fetcher.h" | 11 #include "media/mojo/services/mojo_provision_fetcher.h" |
12 #include "mojo/shell/public/cpp/connect.h" | 12 #include "services/shell/public/cpp/connect.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 std::unique_ptr<ProvisionFetcher> CreateProvisionFetcher( | 18 std::unique_ptr<ProvisionFetcher> CreateProvisionFetcher( |
19 mojo::shell::mojom::InterfaceProvider* interface_provider) { | 19 mojo::shell::mojom::InterfaceProvider* interface_provider) { |
20 interfaces::ProvisionFetcherPtr provision_fetcher_ptr; | 20 interfaces::ProvisionFetcherPtr provision_fetcher_ptr; |
21 mojo::GetInterface(interface_provider, &provision_fetcher_ptr); | 21 mojo::GetInterface(interface_provider, &provision_fetcher_ptr); |
22 return base::WrapUnique( | 22 return base::WrapUnique( |
(...skipping 13 matching lines...) Expand all Loading... |
36 return base::WrapUnique(new MediaCodecAudioDecoder(task_runner)); | 36 return base::WrapUnique(new MediaCodecAudioDecoder(task_runner)); |
37 } | 37 } |
38 | 38 |
39 std::unique_ptr<CdmFactory> AndroidMojoMediaClient::CreateCdmFactory( | 39 std::unique_ptr<CdmFactory> AndroidMojoMediaClient::CreateCdmFactory( |
40 mojo::shell::mojom::InterfaceProvider* interface_provider) { | 40 mojo::shell::mojom::InterfaceProvider* interface_provider) { |
41 return base::WrapUnique(new AndroidCdmFactory( | 41 return base::WrapUnique(new AndroidCdmFactory( |
42 base::Bind(&CreateProvisionFetcher, interface_provider))); | 42 base::Bind(&CreateProvisionFetcher, interface_provider))); |
43 } | 43 } |
44 | 44 |
45 } // namespace media | 45 } // namespace media |
OLD | NEW |