media: Stop registering CDM adapter as a pepper plugin

https://chromium-review.googlesource.com/956255
This commit is contained in:
Samuel Attard 2018-07-22 02:37:13 +10:00 committed by Aleksei Kuzmin
parent 6e2bb728b9
commit b381e852b1
2 changed files with 10 additions and 7 deletions

View file

@ -8,6 +8,7 @@
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/mac/bundle_locations.h" #include "base/mac/bundle_locations.h"
#include "base/native_library.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/sys_info.h" #include "base/sys_info.h"
@ -15,7 +16,7 @@
#include "base/version.h" #include "base/version.h"
#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/widevine_cdm_constants.h" #include "media/cdm/cdm_paths.h"
#include "media/media_buildflags.h" #include "media/media_buildflags.h"
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h" #include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h" #include "third_party/widevine/cdm/widevine_cdm_common.h"
@ -369,13 +370,15 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.AppendASCII(kWidevineCdmBaseDirectory); cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
break; break;
#endif // defined(WIDEVINE_CDM_IS_COMPONENT) #endif // defined(WIDEVINE_CDM_IS_COMPONENT)
// TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. // TODO(crbug.com/663554): Remove this after component updated CDM is
// In the component case, this is the source adapter. Otherwise, it is the // supported on Linux and ChromeOS.
// actual Pepper module that gets loaded. case chrome::FILE_WIDEVINE_CDM:
case chrome::FILE_WIDEVINE_CDM_ADAPTER:
if (!GetInternalPluginsDirectory(&cur)) if (!GetInternalPluginsDirectory(&cur))
return false; return false;
cur = cur.AppendASCII(kWidevineCdmAdapterFileName); cur =
cur.Append(
media::GetPlatformSpecificDirectory(kWidevineCdmBaseDirectory))
.AppendASCII(base::GetNativeLibraryName(kWidevineCdmLibraryName));
break; break;
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) #endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
case chrome::FILE_RESOURCES_PACK: case chrome::FILE_RESOURCES_PACK:

View file

@ -98,7 +98,7 @@ enum {
// (subdir of DIR_PNACL_BASE). // (subdir of DIR_PNACL_BASE).
DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated
// Widevine CDM files. // Widevine CDM files.
FILE_WIDEVINE_CDM_ADAPTER, // Full path to the Widevine CDM adapter file. FILE_WIDEVINE_CDM, // Full path to the Widevine CDM.
FILE_RESOURCES_PACK, // Full path to the .pak file containing FILE_RESOURCES_PACK, // Full path to the .pak file containing
// binary data (e.g., html files and images // binary data (e.g., html files and images
// used by internal pages). // used by internal pages).