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

Unified Diff: chromecast/renderer/key_systems_cast.cc

Issue 2032923002: [Chromecast] Make EME persistent license support optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « chromecast/renderer/key_systems_cast.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/renderer/key_systems_cast.cc
diff --git a/chromecast/renderer/key_systems_cast.cc b/chromecast/renderer/key_systems_cast.cc
index 16c96fc143d7ec803913c5a8dcc8472fdfa9fde5..a97dc0532b364e68234fe17849440b37e4a77d61 100644
--- a/chromecast/renderer/key_systems_cast.cc
+++ b/chromecast/renderer/key_systems_cast.cc
@@ -30,6 +30,10 @@ namespace {
#if defined(PLAYREADY_CDM_AVAILABLE)
class PlayReadyKeySystemProperties : public ::media::KeySystemProperties {
public:
+ explicit PlayReadyKeySystemProperties(bool persistent_license_support)
+ : persistent_license_support_(persistent_license_support) {
+ }
+
std::string GetKeySystemName() const override {
return media::kChromecastPlayreadyKeySystem;
}
@@ -53,7 +57,8 @@ class PlayReadyKeySystemProperties : public ::media::KeySystemProperties {
#if defined(OS_ANDROID)
return EmeSessionTypeSupport::NOT_SUPPORTED;
#else
- return EmeSessionTypeSupport::SUPPORTED;
+ return persistent_license_support_ ? EmeSessionTypeSupport::SUPPORTED
+ : EmeSessionType::NOT_SUPPORTED;
#endif
}
@@ -68,6 +73,9 @@ class PlayReadyKeySystemProperties : public ::media::KeySystemProperties {
EmeFeatureSupport GetDistinctiveIdentifierSupport() const override {
return EmeFeatureSupport::ALWAYS_ENABLED;
}
+
+ private:
+ const bool persistent_license_support_;
};
#endif // PLAYREADY_CDM_AVAILABLE
@@ -75,9 +83,11 @@ class PlayReadyKeySystemProperties : public ::media::KeySystemProperties {
void AddChromecastKeySystems(
std::vector<std::unique_ptr<::media::KeySystemProperties>>*
- key_systems_properties) {
+ key_systems_properties,
+ bool enable_persistent_license_support) {
yucliu1 2016/06/02 16:31:52 Is the flag only for playready?
#if defined(PLAYREADY_CDM_AVAILABLE)
- key_systems_properties->emplace_back(new PlayReadyKeySystemProperties());
+ key_systems_properties->emplace_back(
+ new PlayReadyKeySystemProperties(enable_persistent_license_support));
#endif // defined(PLAYREADY_CDM_AVAILABLE)
#if defined(WIDEVINE_CDM_AVAILABLE)
« no previous file with comments | « chromecast/renderer/key_systems_cast.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698