Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / renderer / media / chrome_key_systems.cc
index c15d493..7ebb4fe 100644 (file)
@@ -14,6 +14,7 @@
 #include "chrome/common/render_messages.h"
 #include "components/cdm/renderer/widevine_key_systems.h"
 #include "content/public/renderer/render_thread.h"
+#include "media/base/eme_constants.h"
 
 #if defined(OS_ANDROID)
 #include "components/cdm/renderer/android_key_systems.h"
@@ -28,8 +29,8 @@
 #include "base/version.h"
 #endif
 
-using content::KeySystemInfo;
-using content::SupportedCodecs;
+using media::KeySystemInfo;
+using media::SupportedCodecs;
 
 #if defined(ENABLE_PEPPER_CDMS)
 static bool IsPepperCdmAvailable(
@@ -73,9 +74,11 @@ static void AddExternalClearKey(
 
   KeySystemInfo info(kExternalClearKeyKeySystem);
 
-  info.supported_codecs = content::EME_CODEC_WEBM_ALL;
+  info.supported_codecs = media::EME_CODEC_WEBM_ALL;
+  info.supported_init_data_types = media::EME_INIT_DATA_TYPE_WEBM;
 #if defined(USE_PROPRIETARY_CODECS)
-  info.supported_codecs |= content::EME_CODEC_MP4_ALL;
+  info.supported_codecs |= media::EME_CODEC_MP4_ALL;
+  info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC;
 #endif  // defined(USE_PROPRIETARY_CODECS)
 
   info.pepper_type = kExternalClearKeyPepperType;
@@ -153,19 +156,19 @@ static void AddPepperBasedWidevine(
                                  additional_param_values,
                                  &codecs);
 
-  SupportedCodecs supported_codecs = content::EME_CODEC_NONE;
+  SupportedCodecs supported_codecs = media::EME_CODEC_NONE;
   for (size_t i = 0; i < codecs.size(); ++i) {
     if (codecs[i] == kCdmSupportedCodecVorbis)
-      supported_codecs |= content::EME_CODEC_WEBM_VORBIS;
+      supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
     if (codecs[i] == kCdmSupportedCodecVp8)
-      supported_codecs |= content::EME_CODEC_WEBM_VP8;
+      supported_codecs |= media::EME_CODEC_WEBM_VP8;
     if (codecs[i] == kCdmSupportedCodecVp9)
-      supported_codecs |= content::EME_CODEC_WEBM_VP9;
+      supported_codecs |= media::EME_CODEC_WEBM_VP9;
 #if defined(USE_PROPRIETARY_CODECS)
     if (codecs[i] == kCdmSupportedCodecAac)
-      supported_codecs |= content::EME_CODEC_MP4_AAC;
+      supported_codecs |= media::EME_CODEC_MP4_AAC;
     if (codecs[i] == kCdmSupportedCodecAvc1)
-      supported_codecs |= content::EME_CODEC_MP4_AVC1;
+      supported_codecs |= media::EME_CODEC_MP4_AVC1;
 #endif  // defined(USE_PROPRIETARY_CODECS)
   }