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

Unified Diff: components/cdm/renderer/android_key_systems.cc

Issue 923283002: Implement checks for distinctiveIdentifier and persistentState in requestMediaKeySystemAccess(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cast Widevine config Created 5 years, 10 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: components/cdm/renderer/android_key_systems.cc
diff --git a/components/cdm/renderer/android_key_systems.cc b/components/cdm/renderer/android_key_systems.cc
index 83a0d0481df831e62aa1727d3dfaf23a08efcb4a..afb5cd322a4b5877c13c84139913cd01d66178e9 100644
--- a/components/cdm/renderer/android_key_systems.cc
+++ b/components/cdm/renderer/android_key_systems.cc
@@ -43,6 +43,10 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems) {
AddWidevineWithCodecs(
WIDEVINE,
static_cast<SupportedCodecs>(response.compositing_codecs),
+ media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent license.
+ media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message.
+ media::EME_FEATURE_NOT_SUPPORTED, // Persistent state.
+ media::EME_FEATURE_ALWAYS_AVAILABLE, // Distinctive identifier.
concrete_key_systems);
}
@@ -50,6 +54,10 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems) {
AddWidevineWithCodecs(
ddorwin 2015/02/19 01:41:33 TODO: Remove with unprefixed. crbug.com/249976
sandersd (OOO until July 31) 2015/02/19 21:08:34 Done.
WIDEVINE_HR_NON_COMPOSITING,
ddorwin 2015/02/19 01:41:33 We need to not support this in unprefixed. We migh
sandersd (OOO until July 31) 2015/02/19 21:08:34 Isn't this what IsKnownKeySystem() does?
static_cast<SupportedCodecs>(response.non_compositing_codecs),
+ media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent license.
+ media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message.
+ media::EME_FEATURE_NOT_SUPPORTED, // Persistent state.
+ media::EME_FEATURE_ALWAYS_AVAILABLE, // Distinctive identifier.
concrete_key_systems);
}
}
@@ -64,7 +72,8 @@ void AddAndroidPlatformKeySystems(
it != key_system_names.end(); ++it) {
SupportedKeySystemResponse response = QueryKeySystemSupport(*it);
if (response.compositing_codecs != media::EME_CODEC_NONE) {
- KeySystemInfo info(*it);
+ KeySystemInfo info;
+ info.key_system = *it;
info.supported_codecs = response.compositing_codecs;
// Here we assume that support for a container implies support for the
// associated initialization data type. KeySystems handles validating
@@ -75,6 +84,12 @@ void AddAndroidPlatformKeySystems(
if (response.compositing_codecs & media::EME_CODEC_MP4_ALL)
info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC;
#endif // defined(USE_PROPRIETARY_CODECS)
+ // Assume the worst.
+ info.persistent_license_support = media::EME_SESSION_TYPE_NOT_SUPPORTED;
+ info.persistent_release_message_support =
+ media::EME_SESSION_TYPE_NOT_SUPPORTED;
+ info.persistent_state_support = media::EME_FEATURE_ALWAYS_AVAILABLE;
ddorwin 2015/02/19 01:41:33 You might mention that this is the worst case for
sandersd (OOO until July 31) 2015/02/19 21:08:34 Done.
+ info.distinctive_identifier_support = media::EME_FEATURE_ALWAYS_AVAILABLE;
concrete_key_systems->push_back(info);
}
}

Powered by Google App Engine
This is Rietveld 408576698