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

Unified Diff: webkit/media/crypto/ppapi/cdm_wrapper.cc

Issue 11270057: Add type argument to pepper content decryptor method GenerateKeyRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: webkit/media/crypto/ppapi/cdm_wrapper.cc
diff --git a/webkit/media/crypto/ppapi/cdm_wrapper.cc b/webkit/media/crypto/ppapi/cdm_wrapper.cc
index 134f2da078286978973a063e8dab3acc01fee242..f2883368081655240bcfad9698e59baa3cddea7f 100644
--- a/webkit/media/crypto/ppapi/cdm_wrapper.cc
+++ b/webkit/media/crypto/ppapi/cdm_wrapper.cc
@@ -440,6 +440,7 @@ class CdmWrapper : public pp::Instance,
// Note: Results of calls to these methods must be reported through the
// PPB_ContentDecryptor_Private interface.
virtual void GenerateKeyRequest(const std::string& key_system,
+ const std::string& type,
pp::VarArrayBuffer init_data) OVERRIDE;
virtual void AddKey(const std::string& session_id,
pp::VarArrayBuffer key,
@@ -530,11 +531,13 @@ CdmWrapper::~CdmWrapper() {
}
void CdmWrapper::GenerateKeyRequest(const std::string& key_system,
+ const std::string& type,
pp::VarArrayBuffer init_data) {
PP_DCHECK(!key_system.empty());
if (!cdm_) {
- cdm_ = CreateCdmInstance(&allocator_, this);
+ cdm_ = CreateCdmInstance(key_system.data(), key_system.size(),
+ &allocator_, this);
PP_DCHECK(cdm_);
if (!cdm_) {
FireKeyError("");
@@ -544,6 +547,7 @@ void CdmWrapper::GenerateKeyRequest(const std::string& key_system,
LinkedKeyMessage key_request(new KeyMessageImpl());
cdm::Status status = cdm_->GenerateKeyRequest(
+ type.data(), type.size(),
static_cast<const uint8_t*>(init_data.Map()),
init_data.ByteLength(),
key_request.get());

Powered by Google App Engine
This is Rietveld 408576698