tree: b0419a44b821792395dc460f049814bced43bf65 [path history] [tgz]
  1. BUILD.gn
  2. chrome_pwa_launcher.ico
  3. chrome_pwa_launcher.ver
  4. chrome_pwa_launcher_exe.rc
  5. chrome_pwa_launcher_main.cc
  6. chrome_pwa_launcher_util.cc
  7. chrome_pwa_launcher_util.h
  8. DEPS
  9. DIR_METADATA
  10. last_browser_file_util.cc
  11. last_browser_file_util.h
  12. last_browser_file_util_unittest.cc
  13. launcher_log.cc
  14. launcher_log.h
  15. launcher_log_reporter.cc
  16. launcher_log_reporter.h
  17. launcher_log_unittest.cc
  18. launcher_log_util.cc
  19. launcher_log_util.h
  20. launcher_update.cc
  21. launcher_update.h
  22. launcher_update_unittest.cc
  23. OWNERS
  24. README.md
chrome/browser/web_applications/chrome_pwa_launcher/README.md

This directory contains files for chrome_pwa_launcher.exe, a Progressive-Web-App launcher needed to enable PWAs to register as file-type handlers on Windows. When run from a PWA‘s directory, chrome_pwa_launcher.exe runs chrome.exe and passes it the PWA’s ID (passed to the launcher by the PWA's file-handler-registration path in the Windows registry) to launch the PWA.

Each PWA has an individual hardlink or copy (if hardlinking fails) of chrome_pwa_launcher.exe in its web-app directory (User Data<profile>\Web Applications<app ID>), which the browser registers with Windows as a file handler for file types the PWA accepts. An individual per-PWA hardlink/copy is required because Windows de-duplicates applications with the same executable path in the Open With menu.

Important features of chrome_pwa_launcher.exe include:

  • Generic icon representing “Chrome PWA”, needed on Windows 7 where setting a custom icon for hardlinks/copies is not possible;
  • Filename renamed to the PWA's display name on Windows 7, where setting a custom display name for hardlinks/copies is not possible and the filename is used instead;
  • Pass launcher version to chrome.exe to check for updates: hardlinks/copies pass their version as a command-line switch, which chrome.exe compares to its own version and replaces all PWA launchers with new hardlinks/copies of the latest chrome_pwa_launcher.exe if needed; and
  • Simple crash logging: the last launch result is recorded in the registry to be read by chrome.exe the next time it runs, avoiding the overhead of full Crashpad logging while providing basic information on whether chrome_pwa_launcher.exe is working.

chrome_pwa_launcher.exe assumes that it is run from a web-app data directory (User Data<profile>\Web Applications<app ID>), as it uses the “Last Browser” file in its great-grandparent User Data directory to find the chrome.exe to launch.

NOTE: PWA launchers must be compiled in a non-component build to support file handling. Component-build EXEs will hit a missing-DLL error if run from the web-app directory.