Intent to Ship: Web Permissions API on WebView

394 views
Skip to first unread message

Peter Birk Pakkenberg

unread,
Jul 18, 2024, 8:00:41 AM7/18/24
to blink-dev, Peter Beverloo, eng...@chromium.org

Specification

https://w3c.github.io/permissions/


Summary


This Intent to Ship covers the launch of the Web Permission API in WebView, an API that has already launched in other browsers and embedders.


WebView has a more limited permission model than other embedders, namely, it doesn’t support separating “checking permission state” from “requesting permissions”, and the Permission API implementation we ship will reflect this. In particular, the API will respond with “denied” for APIs that are not supported by WebView, “granted” for permissions that WebView automatically grants (midi, sensors) and “prompt” for APIs where permission is handled by sending a callback to the WebView-embedding app (camera, microphone, midi-sysex). WebView does offer support for persistent permissions for the Geolocation API, so in apps that use that feature, WebView will respond with “granted” or “prompt” depending on the choices made by the embedding app.


Blink component

Blink>PermissionsAPI

Mobile>WebView


TAG review

None


TAG review status

Not applicable


Risks


Interoperability and Compatibility


The API is already implemented in all major browsers. This Intent to Ship covers the launch in WebView.


WebView application risks

Does this intent deprecate or change behaviour of existing APIs, such that it has potentially high risk for Android WebView-based applications?


This launch does not change any existing behaviour in WebView. However, websites should be aware that they will now be able to use the permissions.query API, which was previously not exposed, and for some APIs (microphone, camera, and MIDI SysEx), they will always get a response of “prompt”. This reflects the fact that these permissions are always forwarded to the embedding app.


Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes


Is this feature fully tested by web-platform-tests?

Yes, where results will be published to wpt.fyi


Flag name on chrome://flags

None


Finch feature name

WebPermissionsApi


Requires code in //chrome?

False


Tracking bug

https://issues.chromium.org/issues/348635849


Measurement

Reuse existing use counter for permissions.query.


Availability expectation

Available in all major browsers. This also adds the API to WebView


Adoption expectation

Already widely adopted.


Adoption plan

Already widely adopted.


Non-OSS dependencies

Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?

No.


Estimated milestones

Shipping on WebView

128





Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6376494003650560


Domenic Denicola

unread,
Jul 18, 2024, 10:34:07 PM7/18/24
to blink-dev, Peter Pakkenberg, Peter Beverloo, eng...@chromium.org
Always exciting to get full cross-platform support!

Can you request the privacy / security / enterprise / debuggability / testing review gates on ChromeStatus? After those are in progress I'll be happen to LGTM.

Mike Taylor

unread,
Jul 22, 2024, 2:49:27 PM7/22/24
to Domenic Denicola, blink-dev, Peter Pakkenberg, Peter Beverloo, eng...@chromium.org

LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e70b074b-addd-438e-b9f1-f0cc839fa00cn%40chromium.org.

Domenic Denicola

unread,
Jul 22, 2024, 8:14:43 PM7/22/24
to Mike Taylor, Domenic Denicola, blink-dev, Peter Pakkenberg, Peter Beverloo, eng...@chromium.org
LGTM2

Peter Birk Pakkenberg

unread,
Jul 23, 2024, 4:43:00 AM7/23/24
to Domenic Denicola, Mike Taylor, blink-dev, Peter Beverloo, eng...@chromium.org
I have requested the review gates as mentioned by Domenic, but I do want to point out that this feature has been in production since 2015 in Chrome, and that we're just closing the loop in bringing it to WebView.


Sincerely,
Google Logo
Peter Birk Pakkenberg
Software Engineer
pb...@chromium.org

Mike Taylor

unread,
Jul 23, 2024, 6:08:25 AM7/23/24
to Peter Birk Pakkenberg, Domenic Denicola, blink-dev, Peter Beverloo, eng...@chromium.org

Yep - thanks Peter. The review gates are still part of the process, even for cases such as this.

Daniel Bratell

unread,
Jul 24, 2024, 11:57:56 AM7/24/24
to Mike Taylor, Peter Birk Pakkenberg, Domenic Denicola, blink-dev, Peter Beverloo, eng...@chromium.org
Reply all
Reply to author
Forward
0 new messages