Currently, there is significant boilerplate / copy-paste code required for an app on Chrome OS to be integrated into system UI, including:
- shelf
- launcher
- intent picker
- external protocol dialog
- Files.app
There is also no consistent way to maintain system-wide settings for apps, such as:
- default URL handlers (and persistence)
- default protocol handlers (and persistence)
- default file type/MIME handlers (and persistence)
And finally, each app platform requires some amount of synchronisation of these settings to maintain consistency, e.g. ensuring that default handlers are the same when navigating to a URL in Chrome browser and when tapping a link in an ARC++ app. For ARC++ in particular, much of this functionality is currently stored inside the container, requiring asynchronous querying to access and not being compatible with other app platforms.
We now have sufficient app platforms that there is a strong need to create a central app registry for Chrome OS to manage all of these properties. Eventually, this will simplify a lot of code that wants to know:
- what apps are installed on the system, and what are their names/icons
- launch an app
- what app is preferred for this particular action
It is currently envisioned that there will be some amount of global state (e.g.default handlers), and then a separate sub-registry for each app platform which is responsible for synchronisation work with that app platform's implementation (e.g. the ARC++ container). In effect, the source of truth for apps will be the app registry; changes will be made to the app registry, and then passed down into the containers if necessary for consistency.
A design doc will be put together to capture these ideas, and circulated to the related teams for their input and feedback. Once the registry exists, code will slowly be migrated to use it over the existing approaches.
Comment 1 by dominickn@chromium.org
, Jun 18 2018