| 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/mojo_cdm_factory.h" | 5 #include "media/mojo/services/mojo_cdm_factory.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 if (CanUseAesDecryptor(key_system)) { | 46 if (CanUseAesDecryptor(key_system)) { |
| 47 scoped_refptr<MediaKeys> cdm( | 47 scoped_refptr<MediaKeys> cdm( |
| 48 new AesDecryptor(security_origin, session_message_cb, session_closed_cb, | 48 new AesDecryptor(security_origin, session_message_cb, session_closed_cb, |
| 49 session_keys_change_cb)); | 49 session_keys_change_cb)); |
| 50 base::ThreadTaskRunnerHandle::Get()->PostTask( | 50 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 51 FROM_HERE, base::Bind(cdm_created_cb, cdm, "")); | 51 FROM_HERE, base::Bind(cdm_created_cb, cdm, "")); |
| 52 return; | 52 return; |
| 53 } | 53 } |
| 54 | 54 |
| 55 interfaces::ContentDecryptionModulePtr cdm_ptr; | 55 mojom::ContentDecryptionModulePtr cdm_ptr; |
| 56 shell::GetInterface<interfaces::ContentDecryptionModule>(interface_provider_, | 56 shell::GetInterface<mojom::ContentDecryptionModule>(interface_provider_, |
| 57 &cdm_ptr); | 57 &cdm_ptr); |
| 58 | 58 |
| 59 MojoCdm::Create(key_system, security_origin, cdm_config, std::move(cdm_ptr), | 59 MojoCdm::Create(key_system, security_origin, cdm_config, std::move(cdm_ptr), |
| 60 session_message_cb, session_closed_cb, | 60 session_message_cb, session_closed_cb, |
| 61 legacy_session_error_cb, session_keys_change_cb, | 61 legacy_session_error_cb, session_keys_change_cb, |
| 62 session_expiration_update_cb, cdm_created_cb); | 62 session_expiration_update_cb, cdm_created_cb); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace media | 65 } // namespace media |
| OLD | NEW |