Skip to content

Commit

Permalink
Add BUILD_FLAG(ENABLE_WIDEVINE) to android_key_systems.
Browse files Browse the repository at this point in the history
Bug=internal 117626741

Test=locally disable widevine and build on atv.

Change-Id: Ic30c773b8c37d6f2ef500dea0bb3ed2a3e94714b
Reviewed-on: https://chromium-review.googlesource.com/c/1308763
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Yuchen Liu <yucliu@chromium.org>
Commit-Queue: Ziyang Cheng <ziyangch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604751}
  • Loading branch information
ziyangch authored and Commit Bot committed Nov 1, 2018
1 parent 568e95c commit f9e2773
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/cdm/renderer/android_key_systems.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@

#include "base/command_line.h"
#include "base/logging.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
#include "media/base/eme_constants.h"
#include "media/base/media_switches.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"
#endif // BUILDFLAG(ENABLE_WIDEVINE)

using media::EmeConfigRule;
using media::EmeFeatureSupport;
using media::EmeInitDataType;
using media::EmeSessionTypeSupport;
using media::KeySystemProperties;
using media::SupportedCodecs;
#if BUILDFLAG(ENABLE_WIDEVINE)
using Robustness = cdm::WidevineKeySystemProperties::Robustness;
#endif // BUILDFLAG(ENABLE_WIDEVINE)

namespace cdm {

Expand Down Expand Up @@ -112,6 +116,7 @@ SupportedKeySystemResponse QueryKeySystemSupport(
return response;
}

#if BUILDFLAG(ENABLE_WIDEVINE)
void AddAndroidWidevine(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
auto response = QueryKeySystemSupport(kWidevineKeySystem);
Expand Down Expand Up @@ -155,6 +160,7 @@ void AddAndroidWidevine(
DCHECK(hw_secure_codecs == media::EME_CODEC_NONE);
}
}
#endif // BUILDFLAG(ENABLE_WIDEVINE)

void AddAndroidPlatformKeySystems(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
Expand Down
3 changes: 3 additions & 0 deletions components/cdm/renderer/android_key_systems.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@

#include "components/cdm/common/cdm_messages_android.h"
#include "media/base/key_system_properties.h"
#include "third_party/widevine/cdm/buildflags.h"

namespace cdm {

#if BUILDFLAG(ENABLE_WIDEVINE)
void AddAndroidWidevine(
std::vector<std::unique_ptr<media::KeySystemProperties>>*
concrete_key_systems);
#endif // BUILDFLAG(ENABLE_WIDEVINE)

// Add platform-supported key systems which are not explicitly handled
// by Chrome.
Expand Down

0 comments on commit f9e2773

Please sign in to comment.