Closed Bug 1184090 Opened 9 years ago Closed 9 years ago

Allow the homescreen to open remote windows

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S3 (24Jul)

People

(Reporter: cwiiis, Assigned: cwiiis)

References

Details

Attachments

(1 file)

Currently, only apps that request the open-remote-window permission can open remote windows, and this is only granted to certified apps.

The actual handling of this is done in Gaia. I suggest we make an exception in that as well as allowing certified apps to open remote windows, we also allow the current homescreen to do so, without the permission.

This would bypass needing to change Gecko and whether a window is remote or not seems like an exposed implementation detail we shouldn't encourage with a permission.
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
Comment on attachment 8634144 [details] [review]
[gaia] Cwiiis:bug1184090-allow-homescreen-to-open-remote-windows > mozilla-b2g:master

Please pass on to another reviewer if I've made the wrong choice.
Attachment #8634144 - Flags: review?(etienne)
Target Milestone: --- → FxOS-S3 (24Jul)
Comment on attachment 8634144 [details] [review]
[gaia] Cwiiis:bug1184090-allow-homescreen-to-open-remote-windows > mozilla-b2g:master

Is the use-case basically "launching webapps like we launch mozApps"?

If so, instead of tying this to the mozapptype which AFAIK is only used as a hint for memory management, I'd piggy back on the |webapps-manage| permission.

What do you think?
Attachment #8634144 - Flags: review?(etienne)
Comment on attachment 8634144 [details] [review]
[gaia] Cwiiis:bug1184090-allow-homescreen-to-open-remote-windows > mozilla-b2g:master

I think that's a great idea, good call :)
Attachment #8634144 - Flags: review?(etienne)
Comment on attachment 8634144 [details] [review]
[gaia] Cwiiis:bug1184090-allow-homescreen-to-open-remote-windows > mozilla-b2g:master

Looks good!

I know it's not funny to do the plumbing but we should really add a basic unit test coverage to this where we dispatch a |mozbrowseropenwindow| and check if a |launchapp| event get's dispatched or not as a result.
Attachment #8634144 - Flags: review?(etienne)
Comment on attachment 8634144 [details] [review]
[gaia] Cwiiis:bug1184090-allow-homescreen-to-open-remote-windows > mozilla-b2g:master

You're right, shame on me for submitting it without a test - rectified :)
Attachment #8634144 - Flags: review?(etienne)
Comment on attachment 8634144 [details] [review]
[gaia] Cwiiis:bug1184090-allow-homescreen-to-open-remote-windows > mozilla-b2g:master

Looks good!

I think we should make the extra setup/teardown part of a suite and add a test checking that it works with the |open-remote-window| permission too + a test that asserts that stubDispatchEvent is not called otherwise, please file a follow up if you don't get to it as part of this patch.
Attachment #8634144 - Flags: review?(etienne) → review+
Made the suggested change and merged: https://github.com/mozilla-b2g/gaia/commit/5b64ab7a26fb7d8620caaf91833f7b105e40d7fe
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: