OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module media.interfaces; |
| 6 |
| 7 // An interface to query media related permission checks and requests. |
| 8 interface MediaPermission { |
| 9 enum Type { |
| 10 PROTECTED_MEDIA_IDENTIFIER, |
| 11 AUDIO_CAPTURE, |
| 12 VIDEO_CAPTURE, |
| 13 }; |
| 14 |
| 15 // Checks and returns whether |type| is permitted for |security_origion| |
| 16 // without triggering user interaction (e.g. permission prompt). The result |
| 17 // will be |false| if the permission has never been set. |
| 18 HasPermission(Type type, string security_origin) => (bool granted); |
| 19 |
| 20 // Requests and returns whether |type| is permitted for |security_origion|. |
| 21 // This may trigger user interaction (e.g. permission prompt) if the |
| 22 // permission has never been set. |
| 23 RequestPermission(Type type, string security_origin) => (bool granted); |
| 24 }; |
OLD | NEW |