OLD | NEW |
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 blink.mojom; | 5 module blink.mojom; |
6 | 6 |
7 import "third_party/WebKit/public/platform/modules/permissions/permission_status
.mojom"; | 7 import "third_party/WebKit/public/platform/modules/permissions/permission_status
.mojom"; |
8 import "url/mojo/origin.mojom"; | 8 import "url/mojo/origin.mojom"; |
9 | 9 |
10 enum PermissionName { | 10 enum PermissionName { |
11 GEOLOCATION, | 11 GEOLOCATION, |
12 NOTIFICATIONS, | 12 NOTIFICATIONS, |
13 PUSH_NOTIFICATIONS, | 13 PUSH_NOTIFICATIONS, |
14 MIDI, | 14 MIDI, |
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 BACKGROUND_SYNC, | 19 BACKGROUND_SYNC, |
| 20 PAYMENT_HANDLER, |
20 }; | 21 }; |
21 | 22 |
22 struct MidiPermissionDescriptor { | 23 struct MidiPermissionDescriptor { |
23 bool sysex; | 24 bool sysex; |
24 }; | 25 }; |
25 | 26 |
26 // Union of possible extensions to the base PermissionDescriptor type. | 27 // Union of possible extensions to the base PermissionDescriptor type. |
27 union PermissionDescriptorExtension { | 28 union PermissionDescriptorExtension { |
28 MidiPermissionDescriptor midi; | 29 MidiPermissionDescriptor midi; |
29 }; | 30 }; |
(...skipping 24 matching lines...) Expand all Loading... |
54 => (array<PermissionStatus> statuses); | 55 => (array<PermissionStatus> statuses); |
55 RevokePermission(PermissionDescriptor permission, url.mojom.Origin origin) | 56 RevokePermission(PermissionDescriptor permission, url.mojom.Origin origin) |
56 => (PermissionStatus status); | 57 => (PermissionStatus status); |
57 // Subscribes |observer| to updates about changes to |origin|'s access to | 58 // Subscribes |observer| to updates about changes to |origin|'s access to |
58 // |permission|. Closing the pipe will cancel the subscription. | 59 // |permission|. Closing the pipe will cancel the subscription. |
59 AddPermissionObserver(PermissionDescriptor permission, | 60 AddPermissionObserver(PermissionDescriptor permission, |
60 url.mojom.Origin origin, | 61 url.mojom.Origin origin, |
61 PermissionStatus last_known_status, | 62 PermissionStatus last_known_status, |
62 PermissionObserver observer); | 63 PermissionObserver observer); |
63 }; | 64 }; |
OLD | NEW |