build: [gn] widevine cdm support behind flag (3-0-x) (#14497)

This commit is contained in:
Shelley Vohr 2018-09-07 22:43:39 -07:00 committed by GitHub
parent 893f866c05
commit 8fd31a3e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 405 additions and 215 deletions

View file

@ -15,10 +15,7 @@
#include "base/version.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/widevine_cdm_constants.h"
#include "media/media_features.h"
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h"
#if defined(OS_ANDROID)
#include "base/android/path_utils.h"
@ -361,23 +358,6 @@ bool PathProvider(int key, base::FilePath* result) {
#endif
cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
break;
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
#if defined(WIDEVINE_CDM_IS_COMPONENT)
case chrome::DIR_COMPONENT_WIDEVINE_CDM:
if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
return false;
cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
break;
#endif // defined(WIDEVINE_CDM_IS_COMPONENT)
// TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings.
// In the component case, this is the source adapter. Otherwise, it is the
// actual Pepper module that gets loaded.
case chrome::FILE_WIDEVINE_CDM_ADAPTER:
if (!GetInternalPluginsDirectory(&cur))
return false;
cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
break;
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
case chrome::FILE_RESOURCES_PACK:
#if defined(OS_MACOSX) && !defined(OS_IOS)
if (base::mac::AmIBundled()) {