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 "content/renderer/media/webcontentdecryptionmodule_impl.h" | 5 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 void WebContentDecryptionModuleImpl::setServerCertificate( | 103 void WebContentDecryptionModuleImpl::setServerCertificate( |
104 const uint8* server_certificate, | 104 const uint8* server_certificate, |
105 size_t server_certificate_length, | 105 size_t server_certificate_length, |
106 blink::WebContentDecryptionModuleResult result) { | 106 blink::WebContentDecryptionModuleResult result) { |
107 DCHECK(server_certificate); | 107 DCHECK(server_certificate); |
108 adapter_->SetServerCertificate( | 108 adapter_->SetServerCertificate( |
109 server_certificate, | 109 server_certificate, |
110 server_certificate_length, | 110 server_certificate_length, |
111 scoped_ptr<media::SimpleCdmPromise>(new SimpleCdmResultPromise(result))); | 111 scoped_ptr<media::SimpleCdmPromise>( |
| 112 new CdmResultPromise<>(result, std::string()))); |
112 } | 113 } |
113 | 114 |
114 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() { | 115 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() { |
115 return adapter_->GetDecryptor(); | 116 return adapter_->GetDecryptor(); |
116 } | 117 } |
117 | 118 |
118 #if defined(ENABLE_BROWSER_CDMS) | 119 #if defined(ENABLE_BROWSER_CDMS) |
119 int WebContentDecryptionModuleImpl::GetCdmId() const { | 120 int WebContentDecryptionModuleImpl::GetCdmId() const { |
120 return adapter_->GetCdmId(); | 121 return adapter_->GetCdmId(); |
121 } | 122 } |
122 #endif // defined(ENABLE_BROWSER_CDMS) | 123 #endif // defined(ENABLE_BROWSER_CDMS) |
123 | 124 |
124 } // namespace content | 125 } // namespace content |
OLD | NEW |