OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module content; | 5 module content; |
6 | 6 |
7 enum PermissionStatus { | 7 import "content/public/common/permission_status.mojom"; |
8 GRANTED, | |
9 DENIED, | |
10 ASK | |
11 }; | |
12 | 8 |
13 enum PermissionName { | 9 enum PermissionName { |
14 GEOLOCATION, | 10 GEOLOCATION, |
15 MIDI_SYSEX, | 11 MIDI_SYSEX, |
16 NOTIFICATIONS, | 12 NOTIFICATIONS, |
17 }; | 13 }; |
18 | 14 |
19 // The Permission service provides permission handling capabilities by exposing | 15 // The Permission service provides permission handling capabilities by exposing |
20 // methods to check, request, and revoke permissions. It also allows a client to | 16 // methods to check, request, and revoke permissions. It also allows a client to |
21 // start listening to permission changes. | 17 // start listening to permission changes. |
22 interface PermissionService { | 18 interface PermissionService { |
23 HasPermission(PermissionName permission, string origin) | 19 HasPermission(PermissionName permission, string origin) |
24 => (PermissionStatus status); | 20 => (PermissionStatus status); |
25 RequestPermission(PermissionName permission, string origin) | 21 RequestPermission(PermissionName permission, string origin) |
26 => (PermissionStatus status); | 22 => (PermissionStatus status); |
27 }; | 23 }; |
OLD | NEW |