| Index: chrome/common/chrome_content_client.cc
|
| diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
|
| index e380249862956a24008df18c2b8dfc5014e7febc..a054b8d55cd9210f47e1b9d273401126617bc928 100644
|
| --- a/chrome/common/chrome_content_client.cc
|
| +++ b/chrome/common/chrome_content_client.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/debug/crash_logging.h"
|
| #include "base/file_util.h"
|
| #include "base/path_service.h"
|
| +#include "base/strings/string16.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_util.h"
|
| @@ -289,6 +290,28 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
|
| kWidevineCdmPluginMimeType,
|
| kWidevineCdmPluginExtension,
|
| kWidevineCdmPluginMimeTypeDescription);
|
| +
|
| + // Add the supported codecs as if they came from the component manifest.
|
| + std::vector<std::string> codecs;
|
| + codecs.push_back(kCdmSupportedCodecVorbis);
|
| + codecs.push_back(kCdmSupportedCodecVp8);
|
| +#if defined(USE_PROPRIETARY_CODECS)
|
| +// TODO(ddorwin): Rename these macros to reflect their real meaning: whether the
|
| +// CDM Chrome was built [and shipped] with support these types.
|
| +#if defined(WIDEVINE_CDM_AAC_SUPPORT_AVAILABLE)
|
| + codecs.push_back(kCdmSupportedCodecAac);
|
| +#endif
|
| +#if defined(WIDEVINE_CDM_AVC1_SUPPORT_AVAILABLE)
|
| + codecs.push_back(kCdmSupportedCodecAvc1);
|
| +#endif
|
| +#endif // defined(USE_PROPRIETARY_CODECS)
|
| + std::string codec_string =
|
| + JoinString(codecs, kCdmSupportedCodecsValueDelimiter);
|
| + widevine_cdm_mime_type.additional_param_names.push_back(
|
| + base::ASCIIToUTF16(kCdmSupportedCodecsParamName));
|
| + widevine_cdm_mime_type.additional_param_values.push_back(
|
| + base::ASCIIToUTF16(codec_string));
|
| +
|
| widevine_cdm.mime_types.push_back(widevine_cdm_mime_type);
|
| widevine_cdm.permissions = kWidevineCdmPluginPermissions;
|
| plugins->push_back(widevine_cdm);
|
|
|