| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/blink/webcontentdecryptionmodule_impl.h" | 5 #include "media/blink/webcontentdecryptionmodule_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/numerics/safe_conversions.h" | 11 #include "base/numerics/safe_conversions.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "media/base/cdm_promise.h" | 14 #include "media/base/cdm_promise.h" |
| 15 #include "media/base/content_decryption_module.h" |
| 15 #include "media/base/key_systems.h" | 16 #include "media/base/key_systems.h" |
| 16 #include "media/base/media_keys.h" | |
| 17 #include "media/blink/cdm_result_promise.h" | 17 #include "media/blink/cdm_result_promise.h" |
| 18 #include "media/blink/cdm_session_adapter.h" | 18 #include "media/blink/cdm_session_adapter.h" |
| 19 #include "media/blink/webcontentdecryptionmodulesession_impl.h" | 19 #include "media/blink/webcontentdecryptionmodulesession_impl.h" |
| 20 #include "third_party/WebKit/public/platform/URLConversion.h" | 20 #include "third_party/WebKit/public/platform/URLConversion.h" |
| 21 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 21 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
| 22 #include "third_party/WebKit/public/platform/WebString.h" | 22 #include "third_party/WebKit/public/platform/WebString.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 #include "url/origin.h" | 24 #include "url/origin.h" |
| 25 | 25 |
| 26 namespace media { | 26 namespace media { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 size_t server_certificate_length, | 94 size_t server_certificate_length, |
| 95 blink::WebContentDecryptionModuleResult result) { | 95 blink::WebContentDecryptionModuleResult result) { |
| 96 DCHECK(server_certificate); | 96 DCHECK(server_certificate); |
| 97 adapter_->SetServerCertificate( | 97 adapter_->SetServerCertificate( |
| 98 std::vector<uint8_t>(server_certificate, | 98 std::vector<uint8_t>(server_certificate, |
| 99 server_certificate + server_certificate_length), | 99 server_certificate + server_certificate_length), |
| 100 std::unique_ptr<SimpleCdmPromise>( | 100 std::unique_ptr<SimpleCdmPromise>( |
| 101 new CdmResultPromise<>(result, std::string()))); | 101 new CdmResultPromise<>(result, std::string()))); |
| 102 } | 102 } |
| 103 | 103 |
| 104 scoped_refptr<MediaKeys> WebContentDecryptionModuleImpl::GetCdm() { | 104 scoped_refptr<ContentDecryptionModule> |
| 105 WebContentDecryptionModuleImpl::GetCdm() { |
| 105 return adapter_->GetCdm(); | 106 return adapter_->GetCdm(); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace media | 109 } // namespace media |
| OLD | NEW |