| Index: webkit/media/crypto/proxy_decryptor.cc
|
| diff --git a/webkit/media/crypto/proxy_decryptor.cc b/webkit/media/crypto/proxy_decryptor.cc
|
| index ddf186af015810c3e4f5eac16d75c6c0a956ea18..d9fd8c57077347bc6b6d11f15cbe37f80cba9812 100644
|
| --- a/webkit/media/crypto/proxy_decryptor.cc
|
| +++ b/webkit/media/crypto/proxy_decryptor.cc
|
| @@ -80,24 +80,24 @@ ProxyDecryptor::~ProxyDecryptor() {
|
|
|
| // TODO(xhwang): Support multiple decryptor notification request (e.g. from
|
| // video and audio decoders).
|
| -void ProxyDecryptor::RequestDecryptorNotification(
|
| - const DecryptorNotificationCB& decryptor_notification_cb) {
|
| +void ProxyDecryptor::RegisterDecryptorReadyNotification(
|
| + const media::DecryptorReadyCB& decryptor_ready_cb) {
|
| base::AutoLock auto_lock(lock_);
|
|
|
| // Cancels the previous decryptor request.
|
| - if (decryptor_notification_cb.is_null()) {
|
| - if (!decryptor_notification_cb_.is_null())
|
| - base::ResetAndReturn(&decryptor_notification_cb_).Run(NULL);
|
| + if (decryptor_ready_cb.is_null()) {
|
| + if (!decryptor_ready_cb_.is_null())
|
| + base::ResetAndReturn(&decryptor_ready_cb_).Run(NULL);
|
| return;
|
| }
|
|
|
| // Normal decryptor request.
|
| - DCHECK(decryptor_notification_cb_.is_null());
|
| + DCHECK(decryptor_ready_cb_.is_null());
|
| if (decryptor_) {
|
| - decryptor_notification_cb.Run(decryptor_.get());
|
| + decryptor_ready_cb.Run(decryptor_.get());
|
| return;
|
| }
|
| - decryptor_notification_cb_ = decryptor_notification_cb;
|
| + decryptor_ready_cb_ = decryptor_ready_cb;
|
| }
|
|
|
| bool ProxyDecryptor::GenerateKeyRequest(const std::string& key_system,
|
| @@ -124,8 +124,8 @@ bool ProxyDecryptor::GenerateKeyRequest(const std::string& key_system,
|
| return false;
|
| }
|
|
|
| - if (!decryptor_notification_cb_.is_null())
|
| - base::ResetAndReturn(&decryptor_notification_cb_).Run(decryptor_.get());
|
| + if (!decryptor_ready_cb_.is_null())
|
| + base::ResetAndReturn(&decryptor_ready_cb_).Run(decryptor_.get());
|
|
|
| return true;
|
| }
|
|
|