Chromium Code Reviews| Index: webkit/media/crypto/ppapi/clear_key_cdm.cc |
| diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc |
| index 53af6fd1c7a31c9c2f0f7b68136369610bdb6fbc..8f06143d8ff0ecb03809e44278fef88dbcdbcfd9 100644 |
| --- a/webkit/media/crypto/ppapi/clear_key_cdm.cc |
| +++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc |
| @@ -125,13 +125,20 @@ void INITIALIZE_CDM_MODULE() { |
| void DeinitializeCdmModule() { |
| } |
| -cdm::ContentDecryptionModule* CreateCdmInstance(const char* key_system_arg, |
| - int key_system_size, |
| - cdm::Allocator* allocator, |
| - cdm::Host* host) { |
| +cdm::ContentDecryptionModule* CreateCdmInstance( |
| + const char* key_system_arg, |
| + int key_system_size, |
| + cdm::Allocator* allocator, |
| + cdm::HostFactory* host_factory) { |
| DVLOG(1) << "CreateCdmInstance()"; |
| DCHECK_EQ(std::string(key_system_arg, key_system_size), kExternalClearKey); |
| - return new webkit_media::ClearKeyCdm(allocator, host); |
| + |
| + void* host = host_factory->GetCdmHost(CDM_HOST_INTERFACE); |
|
ddorwin
2013/02/07 23:50:21
Do you think it is worth putting this call and the
xhwang
2013/02/08 01:23:12
Done.
|
| + if (!host) |
| + return NULL; |
| + |
| + return new webkit_media::ClearKeyCdm(allocator, |
| + reinterpret_cast<cdm::Host*>(host)); |
| } |
| void DestroyCdmInstance(cdm::ContentDecryptionModule* instance) { |