Skip to content

Platform in Platforms

PWAs on ChromeOS (launcher and shelf)

Published Updated

On ChromeOS an installed PWA is listed in the launcher next to Android and Linux apps, can be pinned to the shelf, and opts into OS integration (a badge on its shelf icon, Web Share and Share Target, file handling, right-click shortcuts) through the same manifest members and capability APIs that Chrome uses on Windows, macOS, and Linux.

ChromeOS runs the desktop Chrome browser, so the install path and the installed window are Chrome’s; what ChromeOS adds is where the app appears afterwards and which system surfaces (launcher, shelf, the “Open with” list, the share sheet) it can plug into.

Google’s ChromeOS developer documentation asks for a manifest that supplies the name, icon, start_url, and display mode, plus a service worker that handles fetch and can serve start_url offline (Powerful PWAs, developers.google.com). With that in place, Chrome on a Chromebook offers the same two paths as Chrome on other desktops (English UI): an Install button at the right end of the address bar on sites that qualify, or the three-dot More menu, then Cast, save, and share, then Install page as app… (Chrome Help). The installed app appears “along-side other installed apps, like in the taskbar, launcher, desktop, and app switcher”, in Google’s words; on ChromeOS the taskbar is the shelf.

The manifest members and APIs for ChromeOS integration have separate release schedules.

  • navigator.setAppBadge() on an installed app draws, in chromeos.dev’s description, “a small circle on the app’s home icon” on the shelf.
  • navigator.share() opens the ChromeOS share sheet from any tab; a share_target member registers the installed app to receive links, text, or files from other apps. chromeos.dev advises that the action page work offline so a share never fails for lack of a network.
  • A file_handlers member makes the installed app appear in the ChromeOS “Open with…” list for the declared MIME types and extensions; Chrome 102 and Edge 102 ship the member on desktop platforms including ChromeOS (File Handling API, developer.chrome.com). The files arrive through window.launchQueue.
  • The shortcuts member fills the icon’s right-click menu in the launcher and on the shelf.
  • From Chrome 96 the manifest id member identifies the app independently of start_url, and two PWAs from one origin can coexist when their manifests carry different id values (chromeos.dev, 2022-05-23).

The Google page is explicit that a capability stable in Chrome on Windows or macOS “can sometimes be a multi-year process” to reach stable support on ChromeOS, so a ChromeOS claim needs a ChromeOS check.

Badging and file handling shipped separately and are detected separately; neither check implies the other.

Badging the shelf icon only where badges exist

Section titled “Badging the shelf icon only where badges exist”

Detect setAppBadge before setting a badge in an installed ChromeOS app. Firefox has no implementation, and browser-compat-data records no support in Chrome for Android (badging-api dataset, BCD api.Navigator.setAppBadge).

async function setLauncherBadge(count) {
if (!('setAppBadge' in navigator)) {
return false; // no badge surface here: show the count inside the app instead
}
if (count > 0) {
await navigator.setAppBadge(count);
} else {
await navigator.clearAppBadge();
}
return true;
}

The function returns false when it did nothing, so the caller can render an in-app counter on browsers without the API instead of silently dropping the signal.

The file_handlers member only takes effect once the app is installed, and launchQueue exists only in browsers that implement the API, so the consumer is registered behind a check and the ordinary file picker remains the fallback:

if ('launchQueue' in window && 'files' in LaunchParams.prototype) {
window.launchQueue.setConsumer(async (launchParams) => {
if (!launchParams.files.length) return;
for (const handle of launchParams.files) {
const file = await handle.getFile();
openDocument(file);
}
});
} else {
document.querySelector('#open-file').hidden = false; // <input type="file"> path
}

The 'files' in LaunchParams.prototype test is the one developer.chrome.com documents; a bare 'launchQueue' in window also matches browsers that use the queue for other launch types.

Uninstalling a PWA on a Chromebook is a launcher operation, and its data checkbox is worded differently from the one Chrome shows on Windows and macOS.

Because ChromeOS storage is the browser profile’s storage, that checkbox removes the service worker registration and Cache Storage for the origin as well, so the site loads as a first visit afterwards.

Specifications

SpecificationStatus
None.