Commit f9e2773c authored by ziyangch's avatar ziyangch Committed by Commit Bot

Add BUILD_FLAG(ENABLE_WIDEVINE) to android_key_systems.

Bug=internal 117626741

Test=locally disable widevine and build on atv.

Change-Id: Ic30c773b8c37d6f2ef500dea0bb3ed2a3e94714b
Reviewed-on: https://chromium-review.googlesource.com/c/1308763Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Commit-Queue: Ziyang Cheng <ziyangch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604751}
parent 568e95c0
...@@ -9,12 +9,14 @@ ...@@ -9,12 +9,14 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/logging.h" #include "base/logging.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_thread.h"
#include "media/base/eme_constants.h" #include "media/base/eme_constants.h"
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
#include "media/media_buildflags.h" #include "media/media_buildflags.h"
#if BUILDFLAG(ENABLE_WIDEVINE)
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h" #include "third_party/widevine/cdm/widevine_cdm_common.h"
#endif // BUILDFLAG(ENABLE_WIDEVINE)
using media::EmeConfigRule; using media::EmeConfigRule;
using media::EmeFeatureSupport; using media::EmeFeatureSupport;
...@@ -22,7 +24,9 @@ using media::EmeInitDataType; ...@@ -22,7 +24,9 @@ using media::EmeInitDataType;
using media::EmeSessionTypeSupport; using media::EmeSessionTypeSupport;
using media::KeySystemProperties; using media::KeySystemProperties;
using media::SupportedCodecs; using media::SupportedCodecs;
#if BUILDFLAG(ENABLE_WIDEVINE)
using Robustness = cdm::WidevineKeySystemProperties::Robustness; using Robustness = cdm::WidevineKeySystemProperties::Robustness;
#endif // BUILDFLAG(ENABLE_WIDEVINE)
namespace cdm { namespace cdm {
...@@ -112,6 +116,7 @@ SupportedKeySystemResponse QueryKeySystemSupport( ...@@ -112,6 +116,7 @@ SupportedKeySystemResponse QueryKeySystemSupport(
return response; return response;
} }
#if BUILDFLAG(ENABLE_WIDEVINE)
void AddAndroidWidevine( void AddAndroidWidevine(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) { std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
auto response = QueryKeySystemSupport(kWidevineKeySystem); auto response = QueryKeySystemSupport(kWidevineKeySystem);
...@@ -155,6 +160,7 @@ void AddAndroidWidevine( ...@@ -155,6 +160,7 @@ void AddAndroidWidevine(
DCHECK(hw_secure_codecs == media::EME_CODEC_NONE); DCHECK(hw_secure_codecs == media::EME_CODEC_NONE);
} }
} }
#endif // BUILDFLAG(ENABLE_WIDEVINE)
void AddAndroidPlatformKeySystems( void AddAndroidPlatformKeySystems(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) { std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
......
...@@ -10,12 +10,15 @@ ...@@ -10,12 +10,15 @@
#include "components/cdm/common/cdm_messages_android.h" #include "components/cdm/common/cdm_messages_android.h"
#include "media/base/key_system_properties.h" #include "media/base/key_system_properties.h"
#include "third_party/widevine/cdm/buildflags.h"
namespace cdm { namespace cdm {
#if BUILDFLAG(ENABLE_WIDEVINE)
void AddAndroidWidevine( void AddAndroidWidevine(
std::vector<std::unique_ptr<media::KeySystemProperties>>* std::vector<std::unique_ptr<media::KeySystemProperties>>*
concrete_key_systems); concrete_key_systems);
#endif // BUILDFLAG(ENABLE_WIDEVINE)
// Add platform-supported key systems which are not explicitly handled // Add platform-supported key systems which are not explicitly handled
// by Chrome. // by Chrome.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment