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..dc5a39c3abde68c607abeaa27cdacda75af4c3b4 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,25 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { |
kWidevineCdmPluginMimeType, |
kWidevineCdmPluginExtension, |
kWidevineCdmPluginMimeTypeDescription); |
+ |
+ // Add the supported codecs as if they came from the component manifest. |
+ base::string16 codecs = base::ASCIIToUTF16(kCdmSupportedCodecVorbis) + |
+ base::ASCIIToUTF16(",") + |
xhwang
2013/10/25 17:33:22
do we have comments anywhere about the format? e.g
ddorwin
2013/10/25 19:03:40
Done. Added constant and simplified this.
|
+ base::ASCIIToUTF16(kCdmSupportedCodecVp8); |
+#if defined(USE_PROPRIETARY_CODECS) |
+#if defined(WIDEVINE_CDM_AAC_SUPPORT_AVAILABLE) |
+ codecs += (base::ASCIIToUTF16(",") + |
+ base::ASCIIToUTF16(kCdmSupportedCodecAac)); |
+#endif |
+#if defined(WIDEVINE_CDM_AVC1_SUPPORT_AVAILABLE) |
xhwang
2013/10/25 17:33:22
Per offline discussion, add a TODO about renaming
ddorwin
2013/10/25 19:03:40
Done.
|
+ codecs += (base::ASCIIToUTF16(",") + |
+ base::ASCIIToUTF16(kCdmSupportedCodecAvc1)); |
+#endif |
+#endif // defined(USE_PROPRIETARY_CODECS) |
+ widevine_cdm_mime_type.additional_param_names.push_back( |
+ base::ASCIIToUTF16(kCdmSupportedCodecsParamName)); |
+ widevine_cdm_mime_type.additional_param_values.push_back(codecs); |
+ |
widevine_cdm.mime_types.push_back(widevine_cdm_mime_type); |
widevine_cdm.permissions = kWidevineCdmPluginPermissions; |
plugins->push_back(widevine_cdm); |