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 SENSORS, |
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 22 matching lines...) Expand all Loading... |
52 | 53 |
53 // Runs the callback next time there is a permission status change for the | 54 // Runs the callback next time there is a permission status change for the |
54 // given { permission, origin }. Callers of this method will have to call it | 55 // given { permission, origin }. Callers of this method will have to call it |
55 // again if they want to keep listening to the changes. To prevent race | 56 // again if they want to keep listening to the changes. To prevent race |
56 // conditions, the caller must pass the last known value. | 57 // conditions, the caller must pass the last known value. |
57 GetNextPermissionChange(PermissionDescriptor permission, | 58 GetNextPermissionChange(PermissionDescriptor permission, |
58 url.mojom.Origin origin, | 59 url.mojom.Origin origin, |
59 PermissionStatus last_known_status) | 60 PermissionStatus last_known_status) |
60 => (PermissionStatus status); | 61 => (PermissionStatus status); |
61 }; | 62 }; |
OLD | NEW |