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

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

Issue 990303002: Implement PermissionService::GetNextPermissionChange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_impl
Patch Set: fix chromecast/ Created 5 years, 8 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_SYSEX, 13 MIDI_SYSEX,
14 PROTECTED_MEDIA_IDENTIFIER, 14 PROTECTED_MEDIA_IDENTIFIER,
15 }; 15 };
16 16
17 // The Permission service provides permission handling capabilities by exposing 17 // The Permission service provides permission handling capabilities by exposing
18 // methods to check, request, and revoke permissions. It also allows a client to 18 // methods to check, request, and revoke permissions. It also allows a client to
19 // start listening to permission changes. 19 // start listening to permission changes.
20 interface PermissionService { 20 interface PermissionService {
21 HasPermission(PermissionName permission, string origin) 21 HasPermission(PermissionName permission, string origin)
22 => (PermissionStatus status); 22 => (PermissionStatus status);
23 RequestPermission(PermissionName permission, string origin, bool user_gesture) 23 RequestPermission(PermissionName permission, string origin, bool user_gesture)
24 => (PermissionStatus status); 24 => (PermissionStatus status);
25 RevokePermission(PermissionName permission, string origin) 25 RevokePermission(PermissionName permission, string origin)
26 => (PermissionStatus status); 26 => (PermissionStatus status);
27
28 // Runs the callback next time there is a permission status change for the
29 // given { permission, origin }. Callers of this method will have to call it
30 // again if they want to keep listening to the changes. To prevent race
31 // conditions, the caller must pass the last known value.
32 GetNextPermissionChange(PermissionName permission,
33 string origin,
34 PermissionStatus last_known_status)
35 => (PermissionStatus status);
27 }; 36 };
OLDNEW
« no previous file with comments | « content/browser/permissions/permission_service_impl.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698