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 #include "media/cdm/default_cdm_factory.h" | 5 #include "media/cdm/default_cdm_factory.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 FROM_HERE, base::Bind(cdm_created_cb, nullptr, "Invalid origin.")); | 36 FROM_HERE, base::Bind(cdm_created_cb, nullptr, "Invalid origin.")); |
37 return; | 37 return; |
38 } | 38 } |
39 if (!CanUseAesDecryptor(key_system)) { | 39 if (!CanUseAesDecryptor(key_system)) { |
40 base::ThreadTaskRunnerHandle::Get()->PostTask( | 40 base::ThreadTaskRunnerHandle::Get()->PostTask( |
41 FROM_HERE, | 41 FROM_HERE, |
42 base::Bind(cdm_created_cb, nullptr, "Unsupported key system.")); | 42 base::Bind(cdm_created_cb, nullptr, "Unsupported key system.")); |
43 return; | 43 return; |
44 } | 44 } |
45 | 45 |
46 scoped_ptr<MediaKeys> cdm( | 46 scoped_refptr<MediaKeys> cdm( |
47 new AesDecryptor(security_origin, session_message_cb, session_closed_cb, | 47 new AesDecryptor(security_origin, session_message_cb, session_closed_cb, |
48 session_keys_change_cb)); | 48 session_keys_change_cb)); |
49 base::ThreadTaskRunnerHandle::Get()->PostTask( | 49 base::ThreadTaskRunnerHandle::Get()->PostTask( |
50 FROM_HERE, base::Bind(cdm_created_cb, base::Passed(&cdm), "")); | 50 FROM_HERE, base::Bind(cdm_created_cb, cdm, "")); |
51 } | 51 } |
52 | 52 |
53 } // namespace media | 53 } // namespace media |
OLD | NEW |