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

Side by Side Diff: third_party/WebKit/public/platform/modules/permissions/permission.mojom

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: Move permissions stuff to SensorProxy, remove aw related stuff Created 4 years, 1 month 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 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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698