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

Unified Diff: media/mojo/interfaces/media_permission.mojom

Issue 1838903007: media: Add mojo MediaPermission service Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: 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);
+};

Powered by Google App Engine
This is Rietveld 408576698