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

Unified Diff: webkit/media/crypto/proxy_decryptor.cc

Issue 11492003: Encrypted Media: Support Audio Decrypt-Only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments mostly resolved (I believe); need to add/update tests if this looks good Created 8 years 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/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;
}

Powered by Google App Engine
This is Rietveld 408576698