Index: media/cdm/aes_decryptor.cc |
diff --git a/media/cdm/aes_decryptor.cc b/media/cdm/aes_decryptor.cc |
index 9938bae2c8df544ffde76f1169697986d9d3e8cf..e23ce6338a8bfcbe335525f8bf61caf1a279dd8e 100644 |
--- a/media/cdm/aes_decryptor.cc |
+++ b/media/cdm/aes_decryptor.cc |
@@ -13,6 +13,7 @@ |
#include "crypto/encryptor.h" |
#include "crypto/symmetric_key.h" |
#include "media/base/audio_decoder_config.h" |
+#include "media/base/cdm_key_information.h" |
#include "media/base/cdm_promise.h" |
#include "media/base/decoder_buffer.h" |
#include "media/base/decrypt_config.h" |
@@ -329,9 +330,19 @@ void AesDecryptor::UpdateSession(const std::string& web_session_id, |
promise->resolve(); |
+ // Create the list of all available keys for this session. |
+ CdmKeyInformationVector key_information; |
+ base::AutoLock auto_lock(key_map_lock_); |
+ for (const auto& item : key_map_) { |
+ if (item.second->Contains(web_session_id)) { |
+ CdmKeyInformation key_id(item.first, CdmKeyInformation::USABLE, 0); |
+ key_information.push_back(key_id); |
+ } |
+ } |
+ |
// Assume that at least 1 new key has been successfully added and thus |
- // sending true. |
- session_keys_change_cb_.Run(web_session_id, true); |
+ // sending true for |has_additional_usable_key|. |
+ session_keys_change_cb_.Run(web_session_id, true, key_information); |
} |
void AesDecryptor::CloseSession(const std::string& web_session_id, |