tree: 3ea60315b2aef54f52b136af2c7750ecb8fa336b
  1. _agents/
  2. browser/
  3. common/
  4. docs/
  5. isolated_web_apps/
  6. renderer/
  7. services/
  8. .style.mdformat
  9. AGENTS.md
  10. COMMON_METADATA
  11. DIR_METADATA
  12. OWNERS
  13. README.md
components/webapps/README.md

Web Apps Shared Component (components/webapps)

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

Following Chromium's documentation guidelines, this document focuses on how shared subsystems interact, data flows, and architectural layering. For per-class API and method details, refer to the respective header files.

For platform-specific implementations and embedder orchestrations, see:

Architectural Layering & Delegate Pattern

Code inside components/webapps/ must never depend on embedder code in chrome/ directly.

To communicate back to platform embedders (e.g. chrome/browser/web_applications/ on Desktop or chrome/android/ on Android), this component defines abstract delegate interfaces:

  • WebappsClient: Singleton delegate interface implemented by the embedder (ChromeWebappsClient in chrome/browser/webapps/). Provides embedder hooks for security state, banner/infobar management, install sources, ML segmentation, and conflict detection.

Core Subsystems & Interaction Flow

The shared component orchestrates the pipeline from page discovery to installation promotion:

Active WebContents
         │
         ▼
[1. Page Metadata]           components/webapps/renderer/ (HTML fallback icons & meta tags)
         │
         ▼
[2. Installability Check]    InstallableManager (browser/installable/)
                             ├── Coordinates manifest evaluation & icon verification
                             └── Delivers InstallableData to observers
                                       │
                                       ▼
[3. Promotion & Throttling]  AppBannerManager (browser/banners/)
                             ├── Evaluates engagement & dismissal rate limiting
                             └── Dispatches promotion via WebappsClient delegate
                                       │
                    ┌──────────────────┴──────────────────┐
                    ▼                                     ▼
     Desktop PWA Promotion                 Android Promotion
  PwaInstallPageAction (Omnibox)       Ambient Badge / Bottom Sheet / WebAPK

1. Installability Pipeline (browser/installable/)

  • InstallableManager coordinates asynchronous checks across the page: evaluating manifest validity, verifying icon sizes/codecs, and checking display modes.
  • Packages results into an InstallableData struct delivered to observers.

2. Promotion & Banner Management (browser/banners/)

  • AppBannerManager subscribes to InstallableManager to determine if and when an install prompt should be presented to the user.
  • Consults AppBannerSettingsHelper to check engagement thresholds and enforce dismissal/ignore rate limiting so users are not spammed.
  • Dispatches UI presentation requests to platform-specific embedder coordinators via WebappsClient.

3. Identifiers & Common Types (common/)

4. Shared Isolated Web Apps Utilities (isolated_web_apps/)

  • Common utilities, bundle validation, and signing types for Isolated Web Apps (IWAs) shared across components.

Android Subsystems & Deep Dives