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

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 on 11274065, and addressed 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..3e29705f05315c9c7b7ccf3ae77ef27e32baac58 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& mime_type,
xhwang 2012/10/26 23:08:09 drop mime_
Tom Finegan 2012/10/26 23:30:18 Done.
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(&allocator_, this,
+ key_system.data(), key_system.size());
PP_DCHECK(cdm_);
if (!cdm_) {
FireKeyError("");
@@ -544,6 +547,10 @@ void CdmWrapper::GenerateKeyRequest(const std::string& key_system,
LinkedKeyMessage key_request(new KeyMessageImpl());
cdm::Status status = cdm_->GenerateKeyRequest(
+ key_system.data(),
+ key_system.size(),
+ type.data(),
+ type.size(),
xhwang 2012/10/26 23:08:09 nit: it's okay to have *.data() and *.size() on th
Tom Finegan 2012/10/26 23:30:18 Done.
static_cast<const uint8_t*>(init_data.Map()),
init_data.ByteLength(),
key_request.get());

Powered by Google App Engine
This is Rietveld 408576698