Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / media / base / media_keys.h
index ec81571..022f6bc 100644 (file)
@@ -22,11 +22,11 @@ namespace media {
 
 class Decryptor;
 
-template <typename T>
+template <typename... T>
 class CdmPromiseTemplate;
 
 typedef CdmPromiseTemplate<std::string> NewSessionCdmPromise;
-typedef CdmPromiseTemplate<void> SimpleCdmPromise;
+typedef CdmPromiseTemplate<> SimpleCdmPromise;
 typedef std::vector<std::vector<uint8> > KeyIdsVector;
 typedef CdmPromiseTemplate<KeyIdsVector> KeyIdsPromise;
 
@@ -71,7 +71,10 @@ class MEDIA_EXPORT MediaKeys {
     PERSISTENT_SESSION
   };
 
-  const static uint32 kInvalidSessionId = 0;
+  static const uint32 kInvalidSessionId = 0;
+#if defined(ENABLE_BROWSER_CDMS)
+  static const int kInvalidCdmId = 0;
+#endif
 
   MediaKeys();
   virtual ~MediaKeys();
@@ -123,6 +126,12 @@ class MEDIA_EXPORT MediaKeys {
   // to be valid during the MediaKeys' lifetime.
   virtual Decryptor* GetDecryptor();
 
+#if defined(ENABLE_BROWSER_CDMS)
+  // Returns the CDM ID associated with |this|. May be kInvalidCdmId if no CDM
+  // ID is associated.
+  virtual int GetCdmId() const = 0;
+#endif
+
  private:
   DISALLOW_COPY_AND_ASSIGN(MediaKeys);
 };