Chromium Code Reviews| Index: content/common/permission_service.mojom |
| diff --git a/content/common/permission_service.mojom b/content/common/permission_service.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..64feeb79082896da3e7cb6ceff242ebf3b4fc4ad |
| --- /dev/null |
| +++ b/content/common/permission_service.mojom |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2014 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 content; |
| + |
| +enum PermissionStatus { |
| + GRANTED, |
| + DENIED, |
| + ASK |
| +}; |
| + |
| +enum PermissionName { |
| + GEOLOCATION, |
| +}; |
| + |
| +struct Permission { |
| + 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.
|
| +}; |
| + |
| +// The Permission service provides permission handling capabilities by exposing |
| +// methods to check, request, and revoke permissions. It also allows a client to |
| +// start listening to permission changes. |
| +[Client=PermissionServiceClient] |
| +interface PermissionService { |
| + HasPermission(Permission permission, string origin) |
| + => (PermissionStatus status); |
| + RequestPermission(Permission permission, string origin) |
| + => (PermissionStatus status); |
| + RevokePermission(Permission permission, string origin) |
| + => (PermissionStatus status); |
| + |
| + StartObserving(Permission permission, string origin); |
| + StopObserving(Permission permission, string origin); |
| +}; |
| + |
| +interface PermissionServiceClient { |
| + OnPermissionChange(Permission permission, |
| + string origin, |
| + PermissionStatus status); |
| +}; |