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

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: Rebased and addressed TODOs related to integration of this CL. 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
« no previous file with comments | « ppapi/thunk/ppb_content_decryptor_private_thunk.cc ('k') | webkit/media/crypto/ppapi/clear_key_cdm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ab88d485fedee420e7f1ec486c1bb2c4b16d2908..649426a07b885771a27edf263ab97ebbfe540a7a 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());
« no previous file with comments | « ppapi/thunk/ppb_content_decryptor_private_thunk.cc ('k') | webkit/media/crypto/ppapi/clear_key_cdm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698