COOP: restrict-properties 3/*: CoopRelatedGroup This is the core patch of the COOP: restrict-properties implementation. It introduces an important abstraction, the CoopRelatedGroup. It represents a grouping of BrowsingContext groups (BrowsingInstance) that are capable of a limited set of asynchronous interactions, namely postMessage and closed. It is built as closely as possible to how BrowsingInstance is built on SiteInstance: - It is fully private, and interacted with through SiteInstance and BrowsingInstance. SiteInstance exposes a single new method, GetCoopRelatedSiteInstance(), that works similarly to the GetRelatedSiteInstance() method, but at the CoopRelatedGroup level. - It is collectively owned by the BrowsingInstances that are part of it. A register/unregister mechanism is used to know about the BrowsingInstances that are still part of the group. - It might reuse an existing BrowsingInstance when necessary, similar to how SiteInstance's are reused within a BrowsingInstance. To support BrowsingInstance reuse, some information needs to be available to the CoopRelatedGroup when doing the selection. In particular it needs to know whether the BrowsingInstance hosts COOP: restrict-properties pages, and from which origin. We record that information from the NavigationRequest into UrlInfo. The SiteInstance picking algorithm is updated to output a SiteInstance created via GetCoopRelatedSiteInstance() when a BrowsingContextGroupSwap::kCoopRelatedSwap is requested. Added browser tests and unit tests cover the newly introduced code. Bug: 1221127, 1385827 Change-Id: Ief8436b5d532b6aadc5d9a29d94346e3fae2641c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3948564 Commit-Queue: Arthur Hemery <ahemery@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1112861}
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.