Chromium supports progressive web applications (PWA). For example, if you log in to chat.google.com, you can install the web app by clicking the corresponding icon in the URL bar.
This installs the app as if it were a system app, so it can be displayed on the dock and be found in the activities menu.
That happens by writing a *.desktop file to either /usr/share/applications or ~/.local/share/applications. An example of such file that Chromium installs is
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Google Chat
Exec=/snap/bin/chromium --profile-directory=Default --app-id=mdpkiolbdkhdjpekfbkbmhigcaggjagi
Icon=chrome-mdpkiolbdkhdjpekfbkbmhigcaggjagi-Default
StartupWMClass=crx_mdpkiolbdkhdjpekfbkbmhigcaggjagi
Desktop environments obviously do not look for those in each ~/snap/* directory but thatâs where Chromium can and does write them.
As such, to make PWA work for users of the snap, I would need it to connect to personal-files so that it is able to write and read from ~/.local/share/applications.
Links: