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

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: addressing comments 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..b4f727b3ef4cea47563b735010770adddcbb2483 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,22 @@ 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, use ARRAYSIZE_UNSAFE()
ddorwin 2013/06/20 23:50:12 ... so use ARRAYSIZE_UNSAFE(). ^ might fit
qinmin 2013/06/20 23:54:52 Done.
+// instead.
+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)

Powered by Google App Engine
This is Rietveld 408576698