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

Side by Side Diff: content/common/permission_service.mojom

Issue 722153003: Implement basic mojo Permission service and use it for Geolocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
(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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698