Reland "[PermissionOptions] Return PermissionResult in callback for requests" This is a reland of commit 16f277ba00702c1ce679ccf94291ce51f1a7ab6a The build failure was because the CastPermissionManager interface was not updated to the new PermissionControllerDelegate interface. Original change's description: > [PermissionOptions] Return PermissionResult in callback for requests > > This CL changes the callback type for permission requests to take a PermissionResult instead of a PermissionStatus. PermissionResults contain the PermissionStatus and can optionally contain the stored PermissionSetting, which is something that will need to be accessed by permissions with options, if they want to support permission downgrades (e.g. to detect that only coarse location was granted for a precise location request). > > To create a PermissionResult we use the PermissionStatus and set the PermissionStatusSource to UNSPECIFIED. Since the retrieved_permission_data member is an optional, we don't need to set it across the codebase. By default the permission context sets this member when permissions are set, which executes the permission request callback with this information (see PermissionContextBase::NotifyPermissionSet). > > Bug: 436773343 > Change-Id: Iaf4dfa2f1532db17a069eb6db032350f2a0d2019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6818254 > Reviewed-by: Peter Conn <peconn@chromium.org> > Reviewed-by: Ravjit Uppal <ravjit@chromium.org> > Reviewed-by: Dmitry Gozman <dgozman@chromium.org> > Reviewed-by: Nico Weber <thakis@chromium.org> > Reviewed-by: David Dorwin <ddorwin@chromium.org> > Commit-Queue: Florian Jacky <fjacky@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1501523} Bug: 436773343 Change-Id: I15f96cd7d1fc44ad7df0b375f125c54f025bab16 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6851838 Reviewed-by: David Dorwin <ddorwin@chromium.org> Commit-Queue: Florian Jacky <fjacky@chromium.org> Reviewed-by: Ravjit Uppal <ravjit@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Yuchen Liu <yucliu@chromium.org> Owners-Override: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1503130}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.