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

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..ebcb7a8330e756bd0abff17ca975064f057ba54f 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.
ddorwin 2013/06/20 22:20:15 You could (should?) also ifdef this with WIDEVINE_
qinmin 2013/06/20 23:30:12 Done.
+static const uint8 kWideVineUUID[] = {
+ 0xED, 0xEF, 0x8B, 0xA9, 0x79, 0xD6, 0x4A, 0xCE,
+ 0xA3, 0xC8, 0x27, 0xDC, 0xD5, 0x1D, 0x21, 0xED
+};
+
+const KeySystemUUIDPair kKeySystemToUUIDMapping[] = {
+ { "com.widevine.alpha",
+ std::vector<uint8>(kWideVineUUID, kWideVineUUID + 16) }
ddorwin 2013/06/20 22:20:15 Static initialization of complex type is not allow
qinmin 2013/06/20 23:30:12 Done.
+};
+
+const int kNumKeySystemToUUIDMapping =
+ arraysize(kKeySystemToUUIDMapping);
ddorwin 2013/06/20 22:20:15 fits
qinmin 2013/06/20 23:30:12 Done.
+#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