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

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

Issue 1260193009: renderer: implement multiple permission requesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permissions-request-multiple
Patch Set: Created 5 years, 4 months 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
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 import "content/public/common/permission_status.mojom"; 7 import "content/public/common/permission_status.mojom";
8 8
9 enum PermissionName { 9 enum PermissionName {
10 GEOLOCATION, 10 GEOLOCATION,
11 NOTIFICATIONS, 11 NOTIFICATIONS,
12 PUSH_NOTIFICATIONS, 12 PUSH_NOTIFICATIONS,
13 MIDI, 13 MIDI,
14 MIDI_SYSEX, 14 MIDI_SYSEX,
15 PROTECTED_MEDIA_IDENTIFIER, 15 PROTECTED_MEDIA_IDENTIFIER,
16 }; 16 };
17 17
18 // The Permission service provides permission handling capabilities by exposing 18 // The Permission service provides permission handling capabilities by exposing
19 // methods to check, request, and revoke permissions. It also allows a client to 19 // methods to check, request, and revoke permissions. It also allows a client to
20 // start listening to permission changes. 20 // start listening to permission changes.
21 interface PermissionService { 21 interface PermissionService {
22 HasPermission(PermissionName permission, string origin) 22 HasPermission(PermissionName permission, string origin)
23 => (PermissionStatus status); 23 => (PermissionStatus status);
24 RequestPermission(PermissionName permission, string origin, bool user_gesture) 24 RequestPermission(PermissionName permission, string origin, bool user_gesture)
25 => (PermissionStatus status); 25 => (PermissionStatus status);
26 RequestPermissions(array<PermissionName> permission, string origin, bool user_ gesture)
27 => (array<PermissionStatus> statuses);
26 RevokePermission(PermissionName permission, string origin) 28 RevokePermission(PermissionName permission, string origin)
27 => (PermissionStatus status); 29 => (PermissionStatus status);
28 30
29 // Runs the callback next time there is a permission status change for the 31 // Runs the callback next time there is a permission status change for the
30 // given { permission, origin }. Callers of this method will have to call it 32 // given { permission, origin }. Callers of this method will have to call it
31 // again if they want to keep listening to the changes. To prevent race 33 // again if they want to keep listening to the changes. To prevent race
32 // conditions, the caller must pass the last known value. 34 // conditions, the caller must pass the last known value.
33 GetNextPermissionChange(PermissionName permission, 35 GetNextPermissionChange(PermissionName permission,
34 string origin, 36 string origin,
35 PermissionStatus last_known_status) 37 PermissionStatus last_known_status)
36 => (PermissionStatus status); 38 => (PermissionStatus status);
37 }; 39 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698