Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / encryptedmedia / MediaKeys.idl
index 20062c0..14a542d 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+enum SessionType {
+    "temporary",
+    "persistent"
+};
+
 [
     RuntimeEnabled=EncryptedMedia,
-    Constructor(DOMString keySystem),
-    ConstructorCallWith=ExecutionContext,
-    RaisesException=Constructor,
-    WillBeGarbageCollected,
-    TypeChecking=Interface|Nullable
+    GarbageCollected,
+    TypeChecking=Interface
 ] interface MediaKeys {
     readonly attribute DOMString keySystem;
 
-    [CallWith=ExecutionContext, RaisesException] MediaKeySession createSession(DOMString type, Uint8Array initData);
+    [CallWith=ScriptState] MediaKeySession createSession(optional SessionType sessionType = "temporary");
+
+    [CallWith=ScriptState] static Promise create(DOMString keySystem);
 
-    static boolean isTypeSupported(DOMString keySystem, [Default=NullString] optional DOMString contentType);
+    static boolean isTypeSupported(DOMString keySystem, optional DOMString contentType = null);
 };