Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: webkit/renderer/media/crypto/key_systems_info.cc

Issue 17101027: Add a function to convert key system into UUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/renderer/media/crypto/key_systems_info.cc
diff --git a/webkit/renderer/media/crypto/key_systems_info.cc b/webkit/renderer/media/crypto/key_systems_info.cc
index 010ed2312c038aaacee8ba87ed669f374e439241..9810c349eaa4baa9b47d72cee3ade5e82935b880 100644
--- a/webkit/renderer/media/crypto/key_systems_info.cc
+++ b/webkit/renderer/media/crypto/key_systems_info.cc
@@ -4,8 +4,6 @@
#include "webkit/renderer/media/crypto/key_systems_info.h"
-#include "base/basictypes.h"
-
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
#if defined(WIDEVINE_CDM_AVAILABLE) && \
@@ -101,6 +99,21 @@ const int kNumKeySystemToPepperTypeMapping =
arraysize(kKeySystemToPepperTypeMapping);
#endif // defined(ENABLE_PEPPER_CDMS)
+#if defined(OS_ANDROID)
+// TODO(qinmin): add UUIDs for other key systems.
+const KeySystemUUIDPair kKeySystemToUUIDMapping[] = {
+#if defined(WIDEVINE_CDM_AVAILABLE)
+ { kWidevineKeySystem, { 0xED, 0xEF, 0x8B, 0xA9, 0x79, 0xD6, 0x4A, 0xCE,
+ 0xA3, 0xC8, 0x27, 0xDC, 0xD5, 0x1D, 0x21, 0xED }
+ }
+#endif // defined(WIDEVINE_CDM_AVAILABLE)
+};
+
+// arraySize() does not work if the array is empty, so use ARRAYSIZE_UNSAFE().
+const int kNumKeySystemToUUIDMapping =
+ ARRAYSIZE_UNSAFE(kKeySystemToUUIDMapping);
+#endif // defined(OS_ANDROID)
+
bool IsSystemCompatible(const std::string& key_system) {
#if defined(WIDEVINE_CDM_AVAILABLE) && \
defined(OS_LINUX) && !defined(OS_CHROMEOS)
« no previous file with comments | « webkit/renderer/media/crypto/key_systems_info.h ('k') | webkit/renderer/media/crypto/key_systems_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698