Scratchpad/WebAppIntegration

From KDE Community Wiki

What are WebApps?

"Web apps" is a term that people are using a lot with multiple different definitions:

1) A webapp is just URL. The browser is modified so that it hides the address bar and other tools. It gets a seperate entry in the taskbar, so it looks to the workspace like a new app.

chromium-browser --app=http://bbc.co.uk/news
rekonq --webapp http://bbc.co.uk/news

Firefox has no such feature, Mozilla did have Prism this is now unmaintained.

2) A webapp is a collection of HTML, JS, images etc. It allows offline usage of a webpage, with local storage for data/config.

3) A webapp is local HTML with extensions to make it function like a native app. To access power / notifications / etc.

See Firefox OS or Tizen or to some extent Unity. (unity ships javascript to add notification functionality on a per-site basis)

4) Any arbitrary combination of the above :)

Goals

Tier 1

Make the web apps on Chromium and Firefox "stores" integrate into KDE's kickoff menu. When loaded they should behave like webapp description 1.

Firefox

Firefox installed .desktop files itself when apps were installed. This broke. Sho fixed it. This should be working again

Chromium

This does not work / integrate. I think I can make it work.

Chromium allows for plugins, this https://developer.chrome.com/extensions/management.html#method-getAll

has function chrome.management.onInstalled.addListener(function(ExtensionInfo info) {...});

This will notify us on new apps / apps removed. Unfortunately as a browser plugin we can't interact with the "outside world" to create a .desktop file, or anything useful:

So... We create a NPAPI plugin (browser plugin) with qtbrowserplugin. This can run in Chromium or FF. Our plugin will have a JS invokable method to create a .desktop file with a given id, name + icon. (plus one to remove.).

Our Chromium plugin calls our NPAPI plugin to do the actual .desktop installing.

(this is sort of how the unity extensions work)

Tier 2

Unity level notifications with existing web apps (firefox, chromium and rekonq?)

In theory Unity code should "just run", as they ship a plugin that emits xdg notifications for events

Tier 3

???