[Extensions Offscreen Documents] Add core lifetime enforcement Add the basic infrastructure for lifetime enforcement of offscreen documents. Since offscreen documents can be created for different reasons, this involves the introduction of a base "lifetime enforcer" class, which can then be subclassed to monitor for different types of behavior. These lifetime enforcers will be generated by a new factory (which will create the lifetime enforcers corresponding to the document's reasons), and share the lifetime with the document. The lifetime enforcers are managed by the OffscreenDocumentManager; when all lifetime enforcers report that a document is no longer active, the manager terminates the document. This CL adds the basic implementation of the lifetime enforcers and the factory (along with testing utilities) and tests for the basic lifetime enforcer behavior (i.e., that the document is properly terminated when the enforcers indicate it is inactive). Bug: 1339382 Change-Id: Ia51ccd33147778777d8993945fdb45503de522b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4000752 Commit-Queue: Devlin Cronin <rdevlin.cronin@chromium.org> Reviewed-by: Tim <tjudkins@chromium.org> Cr-Commit-Position: refs/heads/main@{#1068283}
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.