Index: media/mojo/interfaces/media_permission.mojom |
diff --git a/media/mojo/interfaces/media_permission.mojom b/media/mojo/interfaces/media_permission.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..02df2a8466467fc2f28f292386d2fb1b05672421 |
--- /dev/null |
+++ b/media/mojo/interfaces/media_permission.mojom |
@@ -0,0 +1,24 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+module media.interfaces; |
+ |
+// An interface to query media related permission checks and requests. |
+interface MediaPermission { |
+ enum Type { |
+ PROTECTED_MEDIA_IDENTIFIER, |
+ AUDIO_CAPTURE, |
+ VIDEO_CAPTURE, |
+ }; |
+ |
+ // Checks and returns whether |type| is permitted for |security_origion| |
+ // without triggering user interaction (e.g. permission prompt). The result |
+ // will be |false| if the permission has never been set. |
+ HasPermission(Type type, string security_origin) => (bool granted); |
+ |
+ // Requests and returns whether |type| is permitted for |security_origion|. |
+ // This may trigger user interaction (e.g. permission prompt) if the |
+ // permission has never been set. |
+ RequestPermission(Type type, string security_origin) => (bool granted); |
+}; |