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

Unified Diff: media/base/android/android_cdm_factory.cc

Issue 2268283003: media: Add External Clear Key content browser test on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 4 years, 4 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
Index: media/base/android/android_cdm_factory.cc
diff --git a/media/base/android/android_cdm_factory.cc b/media/base/android/android_cdm_factory.cc
index 729ff7dbe80893cd28a5364c603edf5c69775bf8..6ee18f0ea7ac0180674b5355f011fe25399a05bb 100644
--- a/media/base/android/android_cdm_factory.cc
+++ b/media/base/android/android_cdm_factory.cc
@@ -8,7 +8,9 @@
#include "media/base/android/media_drm_bridge.h"
#include "media/base/bind_to_current_loop.h"
#include "media/base/cdm_config.h"
+#include "media/base/key_system_names.h"
#include "media/base/key_systems.h"
+#include "media/cdm/aes_decryptor.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h"
#include "url/gurl.h"
@@ -37,6 +39,16 @@ void AndroidCdmFactory::Create(
return;
}
+ // Create AesDecryptor here to support External Clear Key key system.
+ // This is used for testing.
+ if (IsExternalClearKey(key_system)) {
ddorwin 2016/09/14 01:06:27 Let's discuss.
xhwang 2016/09/16 18:49:58 Done.
+ scoped_refptr<MediaKeys> cdm(
+ new AesDecryptor(security_origin, session_message_cb, session_closed_cb,
+ session_keys_change_cb));
+ bound_cdm_created_cb.Run(cdm, "");
+ return;
+ }
+
std::string error_message;
if (!MediaDrmBridge::IsKeySystemSupported(key_system)) {

Powered by Google App Engine
This is Rietveld 408576698