OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 content; | |
6 | |
7 enum PermissionStatus { | |
8 GRANTED, | |
9 DENIED, | |
10 ASK | |
11 }; | |
12 | |
13 enum PermissionName { | |
14 GEOLOCATION, | |
15 }; | |
16 | |
17 struct Permission { | |
18 PermissionName name; | |
blundell
2014/11/14 08:29:20
What is the reason for the existence of the Permis
mlamouri (slow - plz ping)
2014/11/14 11:37:11
Done.
| |
19 }; | |
20 | |
21 // The Permission service provides permission handling capabilities by exposing | |
22 // methods to check, request, and revoke permissions. It also allows a client to | |
23 // start listening to permission changes. | |
24 [Client=PermissionServiceClient] | |
25 interface PermissionService { | |
26 HasPermission(Permission permission, string origin) | |
27 => (PermissionStatus status); | |
28 RequestPermission(Permission permission, string origin) | |
29 => (PermissionStatus status); | |
30 RevokePermission(Permission permission, string origin) | |
31 => (PermissionStatus status); | |
32 | |
33 StartObserving(Permission permission, string origin); | |
34 StopObserving(Permission permission, string origin); | |
35 }; | |
36 | |
37 interface PermissionServiceClient { | |
38 OnPermissionChange(Permission permission, | |
39 string origin, | |
40 PermissionStatus status); | |
41 }; | |
OLD | NEW |