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

Unified Diff: media/mojo/services/mojo_cdm_service.cc

Issue 833963003: Pass key_information on SessionKeysChange message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes Created 5 years, 11 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
« no previous file with comments | « media/mojo/services/mojo_cdm_service.h ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_cdm_service.cc
diff --git a/media/mojo/services/mojo_cdm_service.cc b/media/mojo/services/mojo_cdm_service.cc
index 8b6673b9aae6a1c6a6219308b09168b5a04cb223..490fe0d9f049753dd0c37be8cb013b7f1b8286d8 100644
--- a/media/mojo/services/mojo_cdm_service.cc
+++ b/media/mojo/services/mojo_cdm_service.cc
@@ -5,8 +5,10 @@
#include "media/mojo/services/mojo_cdm_service.h"
#include "base/bind.h"
+#include "media/base/cdm_key_information.h"
#include "media/base/key_systems.h"
#include "media/cdm/aes_decryptor.h"
+#include "media/mojo/services/media_type_converters.h"
#include "media/mojo/services/mojo_cdm_promise.h"
#include "mojo/common/common_type_converters.h"
@@ -14,7 +16,6 @@ namespace media {
typedef MojoCdmPromise<> SimpleMojoCdmPromise;
typedef MojoCdmPromise<std::string> NewSessionMojoCdmPromise;
-typedef MojoCdmPromise<std::vector<std::vector<uint8_t>>> KeyIdsMojoCdmPromise;
MojoCdmService::MojoCdmService(const mojo::String& key_system)
: weak_factory_(this) {
@@ -111,8 +112,13 @@ void MojoCdmService::OnSessionMessage(const std::string& session_id,
}
void MojoCdmService::OnSessionKeysChange(const std::string& session_id,
- bool has_additional_usable_key) {
- client()->OnSessionKeysChange(session_id, has_additional_usable_key);
+ bool has_additional_usable_key,
+ CdmKeysInfo keys_info) {
+ mojo::Array<mojo::CdmKeyInformationPtr> keys_data;
+ for (const auto& key : keys_info)
+ keys_data.push_back(mojo::CdmKeyInformation::From(*key));
+ client()->OnSessionKeysChange(session_id, has_additional_usable_key,
+ keys_data.Pass());
}
void MojoCdmService::OnSessionExpirationUpdate(
« no previous file with comments | « media/mojo/services/mojo_cdm_service.h ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698