diff options
author | ddorwin <ddorwin@chromium.org> | 2015-04-01 20:35:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-02 03:35:30 +0000 |
commit | 53625eed98105bfa900672cefa6336280272e9f7 (patch) | |
tree | 5c9e048636200d27736f197ddf52d5f6062c27ee /components/cdm | |
parent | 8110808664066715bd1eea9160d4b240c7b78dc8 (diff) | |
download | chromium_src-53625eed98105bfa900672cefa6336280272e9f7.zip chromium_src-53625eed98105bfa900672cefa6336280272e9f7.tar.gz chromium_src-53625eed98105bfa900672cefa6336280272e9f7.tar.bz2 |
Replace kMediaDrmEnableNonCompositing swicth with use_video_overlay_for_embedded_encrypted_video pref
Disables kMediaDrmEnableNonCompositing by default in WebView.
It is now controlled by the pref.
Also updates comments related to enabling unprefixed EME.
BUG=470275,470279
Review URL: https://codereview.chromium.org/1045173002
Cr-Commit-Position: refs/heads/master@{#323420}
Diffstat (limited to 'components/cdm')
-rw-r--r-- | components/cdm/renderer/android_key_systems.cc | 13 | ||||
-rw-r--r-- | components/cdm/renderer/android_key_systems.h | 7 |
2 files changed, 13 insertions, 7 deletions
diff --git a/components/cdm/renderer/android_key_systems.cc b/components/cdm/renderer/android_key_systems.cc index d9bb106..e1538ba 100644 --- a/components/cdm/renderer/android_key_systems.cc +++ b/components/cdm/renderer/android_key_systems.cc @@ -39,21 +39,22 @@ static SupportedKeySystemResponse QueryKeySystemSupport( return response; } -void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems) { +void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems, + bool is_non_compositing_supported) { SupportedKeySystemResponse response = QueryKeySystemSupport( kWidevineKeySystem); // When creating the WIDEVINE key system, BrowserCdmFactoryAndroid configures - // the CDM's security level based on the --mediadrm-enable-non-compositing - // flag (L1 if the flag is enabled, L3 otherwise). Therefore the supported - // codec/robustenss combinations depend on that flag. + // the CDM's security level based on a pref. Therefore the supported + // codec/robustenss combinations depend on that pref, represented by + // |bool is_non_compositing_supported|. // TODO(sandersd): For unprefixed, set the security level based on the // requested robustness instead of the flag. http://crbug.com/467779 + // We should also stop using the term "non_compositing." SupportedCodecs codecs = response.compositing_codecs; EmeRobustness max_audio_robustness = EmeRobustness::SW_SECURE_CRYPTO; EmeRobustness max_video_robustness = EmeRobustness::SW_SECURE_CRYPTO; - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kMediaDrmEnableNonCompositing)) { + if (is_non_compositing_supported) { codecs = response.non_compositing_codecs; max_audio_robustness = EmeRobustness::HW_SECURE_CRYPTO; max_video_robustness = EmeRobustness::HW_SECURE_ALL; diff --git a/components/cdm/renderer/android_key_systems.h b/components/cdm/renderer/android_key_systems.h index fb962b1..b27f57c 100644 --- a/components/cdm/renderer/android_key_systems.h +++ b/components/cdm/renderer/android_key_systems.h @@ -12,7 +12,12 @@ namespace cdm { void AddAndroidWidevine( - std::vector<media::KeySystemInfo>* concrete_key_systems); + std::vector<media::KeySystemInfo>* concrete_key_systems, + // TODO(sandersd): Non-compositing support depends on the + // use_video_overlay_for_embedded_encrypted_video pref, which may differ per + // WebContents, meaning this cannot be a global setting for the renderer + // process. Handle this per WebContents instead. http://crbug.com/467779 + bool is_non_compositing_supported); // Add platform-supported key systems which are not explicitly handled // by Chrome. |