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

Side by Side Diff: components/permission/public/interfaces/permission.mojom

Issue 1373883003: Move geolocation and permission mojoms into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 permission;
6 6
7 import "content/public/common/permission_status.mojom"; 7 import "components/permission/public/interfaces/permission_status.mojom";
8 8
9 enum PermissionName { 9 enum Name {
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 DURABLE_STORAGE, 16 DURABLE_STORAGE,
17 AUDIO_CAPTURE, 17 AUDIO_CAPTURE,
18 VIDEO_CAPTURE, 18 VIDEO_CAPTURE,
19 }; 19 };
20 20
21 // The Permission service provides permission handling capabilities by exposing 21 // The Permission service provides permission handling capabilities by exposing
22 // methods to check, request, and revoke permissions. It also allows a client to 22 // methods to check, request, and revoke permissions. It also allows a client to
23 // start listening to permission changes. 23 // start listening to permission changes.
24 interface PermissionService { 24 interface PermissionService {
25 HasPermission(PermissionName permission, string origin) 25 HasPermission(Name permission, string origin)
26 => (PermissionStatus status); 26 => (Status status);
27 RequestPermission(PermissionName permission, string origin, bool user_gesture) 27 RequestPermission(Name permission, string origin, bool user_gesture)
28 => (PermissionStatus status); 28 => (Status status);
29 RequestPermissions(array<PermissionName> permission, string origin, bool user_ gesture) 29 RequestPermissions(array<Name> permission, string origin, bool user_gesture)
30 => (array<PermissionStatus> statuses); 30 => (array<Status> statuses);
31 RevokePermission(PermissionName permission, string origin) 31 RevokePermission(Name permission, string origin)
32 => (PermissionStatus status); 32 => (Status status);
33 33
34 // Runs the callback next time there is a permission status change for the 34 // Runs the callback next time there is a permission status change for the
35 // given { permission, origin }. Callers of this method will have to call it 35 // given { permission, origin }. Callers of this method will have to call it
36 // again if they want to keep listening to the changes. To prevent race 36 // again if they want to keep listening to the changes. To prevent race
37 // conditions, the caller must pass the last known value. 37 // conditions, the caller must pass the last known value.
38 GetNextPermissionChange(PermissionName permission, 38 GetNextPermissionChange(Name permission,
39 string origin, 39 string origin,
40 PermissionStatus last_known_status) 40 Status last_known_status)
41 => (PermissionStatus status); 41 => (Status status);
42 }; 42 };
OLDNEW
« no previous file with comments | « components/permission/public/interfaces/BUILD.gn ('k') | components/permission/public/interfaces/permission_interfaces.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698