desktop-pwas: Create mechanism for OS shortcuts menu to add params into
the app's launch url This CL fixes an issue where clicking an item in a PWA's shortcuts menu always navigates to the PWA's start_url. To fix this, it adds a new command line switch. When registering the shortcuts menu with the OS, it uses this switch to pass the shortcut url as a command line argument. In WebAppLaunchManager, when kDesktopPWAsAppIconShortcutsMenu is enabled, it sets AppLaunchParams' override_url member to the switch's value i.e. the shortcut url. Note: The shortcut url that the switch is set to in the shortcuts menu registration code has the same origin as the app's start_url. This is validated as part of web app manifest parsing. I verified that this fix works with Extensions based as well as WebApp based PWAs. Bug: 955497 Change-Id: Ib6360b16fe976e7e498bd783cf44911fe8c75b7f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213344 Commit-Queue: Rahul Singh <rahsin@microsoft.com> Reviewed-by:David Bienvenu <davidbienvenu@chromium.org> Reviewed-by:
Alexey Baskakov <loyso@chromium.org> Reviewed-by:
Alan Cutter <alancutter@chromium.org> Cr-Commit-Position: refs/heads/master@{#772441}
Showing
Please register or sign in to comment