If there is a default GApplication, then we should use the GApplication suspend inhibitor API, so that it automatically works inside flatpak. Currently WebKit is using the org.freedesktop.ScreenSaver D-Bus API, which is blocked by default. It would be better if applications were not required to magically know that they need to whitelist this.
Aren't we going to replace that with an impl in PAL anyway?
Yes. The problem I just realized is that, while this will work right now, for WebKitWebViewBase, the only place that takes a sleep inhibitor currently, it conflicts with the task in bug #178485, which would expose inhibitors to the web process and which would inhibit suspend on video playback. We might need to use the flatpak portal D-Bus API directly.
(The conflict is because the GtkApplication would not be available in the web process.)