Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: content/renderer/media/webcontentdecryptionmodule_impl.cc

Issue 604283003: Refactor CdmPromise and related classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + override Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/crypto/proxy_decryptor.cc ('k') | content/renderer/media/webcontentdecryptionmodulesession_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698