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

Unified Diff: trunk/src/content/renderer/media/crypto/key_systems.h

Issue 23708020: Revert 222074 "Refactor KeySystems code to call a function to po..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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: trunk/src/content/renderer/media/crypto/key_systems.h
===================================================================
--- trunk/src/content/renderer/media/crypto/key_systems.h (revision 222090)
+++ trunk/src/content/renderer/media/crypto/key_systems.h (working copy)
@@ -15,8 +15,49 @@
class WebString;
}
+// Definitions:
+// * Key system
+// https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#key-system
+// * Concrete key system
+// A key system string that can be instantiated, such as
+// via the MediaKeys constructor. Examples include "org.w3.clearkey" and
+// "com.widevine.alpha".
+// * Abstract key system
+// A key system string that cannot be instantiated like a concrete key system
+// but is otherwise useful, such as in discovery using isTypeSupported().
+// * Parent key system
+// A key system string that is one level up from the child key system. It may
+// be an abstract key system.
+// As an example, "com.example" is the parent of "com.example.foo".
+
namespace content {
+// Adds a concrete key system along with platform-specific information about how
+// to instantiate it. Must be called before AddSupportedType().
+// May only be called once per |concrete_key_system|.
+// When not empty, |parent_key_system| will add a mapping to the
+// |concrete_key_system| that can be used to check supported types.
+// Only one parent key system is currently supported per concrete key system.
+CONTENT_EXPORT void AddConcreteSupportedKeySystem(
+ const std::string& concrete_key_system,
+ bool use_aes_decryptor,
+#if defined(ENABLE_PEPPER_CDMS)
+ const std::string& pepper_type,
+#elif defined(OS_ANDROID)
+ const uint8 uuid[16],
+#endif
+ const std::string& parent_key_system);
+
+// Specifies the container and codec combinations supported by
+// |concrete_key_system|.
+// Multiple codecs can be listed. In all cases, the container
+// without a codec is also supported.
+// |concrete_key_system| must be a concrete supported key system previously
+// added using AddConcreteSupportedKeySystem().
+CONTENT_EXPORT void AddSupportedType(const std::string& concrete_key_system,
+ const std::string& mime_type,
+ const std::string& codecs_list);
+
// Returns whether |key_system| is a real supported key system that can be
// instantiated.
// Abstract parent |key_system| strings will return false.
« no previous file with comments | « trunk/src/content/public/renderer/key_system_info.cc ('k') | trunk/src/content/renderer/media/crypto/key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698