| Index: third_party/WebKit/public/platform/modules/permissions/permission.mojom
|
| diff --git a/third_party/WebKit/public/platform/modules/permissions/permission.mojom b/third_party/WebKit/public/platform/modules/permissions/permission.mojom
|
| index ef429379f97c3836ee0ef8b504482fcac89ff004..93b870ae0a9429c11a8fc927881834cd1b3c790b 100644
|
| --- a/third_party/WebKit/public/platform/modules/permissions/permission.mojom
|
| +++ b/third_party/WebKit/public/platform/modules/permissions/permission.mojom
|
| @@ -35,6 +35,11 @@ struct PermissionDescriptor {
|
| PermissionDescriptorExtension? extension;
|
| };
|
|
|
| +// Interface a client can implement to observe permission changes.
|
| +interface PermissionObserver {
|
| + OnPermissionStatusChange(PermissionStatus status);
|
| +};
|
| +
|
| // The Permission service provides permission handling capabilities by exposing
|
| // methods to check, request, and revoke permissions. It also allows a client to
|
| // start listening to permission changes.
|
| @@ -49,13 +54,8 @@ interface PermissionService {
|
| => (array<PermissionStatus> statuses);
|
| RevokePermission(PermissionDescriptor permission, url.mojom.Origin origin)
|
| => (PermissionStatus status);
|
| -
|
| - // Runs the callback next time there is a permission status change for the
|
| - // given { permission, origin }. Callers of this method will have to call it
|
| - // again if they want to keep listening to the changes. To prevent race
|
| - // conditions, the caller must pass the last known value.
|
| - GetNextPermissionChange(PermissionDescriptor permission,
|
| - url.mojom.Origin origin,
|
| - PermissionStatus last_known_status)
|
| - => (PermissionStatus status);
|
| + AddPermissionObserver(PermissionDescriptor permission,
|
| + url.mojom.Origin origin,
|
| + PermissionStatus last_known_status,
|
| + PermissionObserver observer);
|
| };
|
|
|