Back to Chromium

Web Apps Shared Component (`components/webapps`)

components/webapps/README.md

151.0.7878.12.6 KB
Original Source

Web Apps Shared Component (components/webapps)

This directory contains features and logic for Web Applications (Progressive Web Apps) that are shared between different platforms (primarily Android and Desktop).

For platform-specific implementations and orchestrations, see:

Key Subsystems

1. Installability Detection (browser/installable/)

The InstallableManager is responsible for checking if a website is installable as a Progressive Web App. It verifies:

  • Presence and validity of a Web App Manifest.
  • Service worker registration (if required).
  • Icon requirements.
  • Other installability criteria.

See header files for details:

2. App Banners and Promotion (browser/banners/)

The AppBannerManager decides when and how to promote PWA installation to the user (e.g., showing an install icon in the omnibox, an ambient badge, or a bottom sheet). It uses InstallableManager to check eligibility and tracks user engagement to avoid spamming.

See header files for details:

3. Identifiers

Web apps use specific identifiers to track installations and partition data.

  • See Web App Identifiers for details on Manifest ID, App ID, and platform-specific identifiers.

Deep Dives (Android-specific)

Documentation Guidelines

Following the model of Desktop Web Apps README:

  • Markdown documentation (in docs/) should focus on high-level architecture, cross-class interactions, and concepts.
  • Class-level documentation (in header files) should document the responsibilities of individual classes and their APIs.