Closed Bug 861494 Opened 11 years ago Closed 11 years ago

Add activities support to desktop-helper if the runtime support MozActivity

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

Attachments

(2 files)

In order for this addon to have any effect you need a runtime patched to remove #ifdef MOZ_SYS_MSG in order to replace it with a preference like other apis.

Bug for the runtime and poc is coming.
Attached patch PatchSplinter Review
In order to have this extension working Gecko needs to be patched with the poc in bug 861496. It won't hurt to land this sooner since the code for Activity was using postMessage anyway (and this does not work anymore with the right permissions).

So Kevin I got Activities working in the browser with this and the Gecko patch. I will show you tomorrow / monday :)

I suggest to land this asap and push on bug 861496 instead of spending time to maintain shims.

Also I had a lot of XXX in desktop-helper/bootstrap.js and desktop-helper/content/content.js mostly because my mind if now clearer about how this stuff should work with the multiple addons:
 - Having mocks on b2g-desktop will be good for developers / simulation. So the desktop-helper addon should only try to do that at the end : load mocks. That will benefit the simulator too.
 - Other features such as keyboard support / activities support can be loaded as additional addon and should not be loaded with a profile made for b2g-desktop (this could be done by tweaking the install.rdf of those addons). Their relative code should not leak in desktop-helper/ (using overlays to execute some js at startup will be the solution here).
 - In the future the keyboard will be part of dom/ so the addon will be useless.
 - The code for Activities will still be necessary though so it worth thinking of a better way to steal code from b2g/. Not all of it is needed. In fact most of the code of shell.js is not needed on an embedded runtime in Firefox, but it would be nice to have a clean overview of what is needed / what is not and to have a magic way to get that from gecko instead of duplicating code by end with some minor tweaks (ochameau has some ideas on this I think).

So this is globally the plan I have in mind. Should be pretty straighforward once the packaging / sharing issue is resolved.
Attachment #737123 - Flags: review?(kgrandon)
Kevin if you want to try you can find FF Nightly binaries here: http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/vnicolas@mozilla.com-4fbe449b0af5/

A few activities related things are broken but they mostly works.
@Vivien - this sounds amazing! I agree that the desktop helper should only be used to load mocks, and ideally as few as possible. I am very interested to see this, so will see if I can test it out with your binary. Let's definitely try to land this as soon as possible.
Attachment #737123 - Flags: review?(kgrandon) → review+
Attached file Patch part 2
Attachment #737655 - Flags: review?(21)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: