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

Unified Diff: webkit/media/crypto/ppapi/content_decryption_module.h

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/content_decryption_module.h
diff --git a/webkit/media/crypto/ppapi/content_decryption_module.h b/webkit/media/crypto/ppapi/content_decryption_module.h
index 7785dae1d3db3358fb1c73eb9568918dbeb29ef9..4a95c565ffa7a394ec3256ebcfa5871f8c587ea5 100644
--- a/webkit/media/crypto/ppapi/content_decryption_module.h
+++ b/webkit/media/crypto/ppapi/content_decryption_module.h
@@ -26,7 +26,10 @@ extern "C" {
// Caller retains ownership of arguments, which must outlive the call to
// DestroyCdmInstance below.
CDM_EXPORT cdm::ContentDecryptionModule* CreateCdmInstance(
- cdm::Allocator* allocator, cdm::CdmHost* host);
+ cdm::Allocator* allocator,
+ cdm::CdmHost* host,
+ const char* key_system,
ddorwin 2012/10/26 23:00:11 I think these should be first.
Tom Finegan 2012/10/26 23:30:18 Done.
+ int key_system_size);
CDM_EXPORT void DestroyCdmInstance(cdm::ContentDecryptionModule* instance);
CDM_EXPORT const char* GetCdmVersion();
}
@@ -204,7 +207,7 @@ enum StreamType {
// when a Buffer is created that will never be returned to the caller.
class ContentDecryptionModule {
public:
- // Generates a |key_request| given the |init_data|.
+ // Generates a |key_request| given the |key_system|, |type| and |init_data|.
//
// Returns kSuccess if the key request was successfully generated,
// in which case the callee should have allocated memory for the output
@@ -212,11 +215,11 @@ class ContentDecryptionModule {
// to the caller.
// Returns kSessionError if any error happened, in which case the
// |key_request| should not be used by the caller.
- //
- // TODO(xhwang): It's not safe to pass the ownership of the dynamically
- // allocated memory over library boundaries. Fix it after related PPAPI change
- // and sample CDM are landed.
- virtual Status GenerateKeyRequest(const uint8_t* init_data,
+ virtual Status GenerateKeyRequest(const char* key_system,
ddorwin 2012/10/26 23:00:11 I don't think we need key_system here. cdm_wrapper
Tom Finegan 2012/10/26 23:30:18 Done.
+ int key_system_size,
+ const char* type,
+ int type_size,
+ const uint8_t* init_data,
int init_data_size,
KeyMessage* key_request) = 0;

Powered by Google App Engine
This is Rietveld 408576698