Closed Bug 1262391 Opened 9 years ago Closed 9 years ago

Create a 'launch' method in order to open current chrome:// websites

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: apastor, Assigned: apastor)

References

Details

(Whiteboard: [Transition])

Attachments

(1 file)

Adding a launch method to the returned object in getByManifestURL will allow us to open current 'apps' as chrome
Assignee: nobody → apastor
Whiteboard: [transition]
Whiteboard: [transition] → [Transition]
Comment on attachment 8739030 [details] [review] [gaia] albertopq:1262391-add-launch > mozilla-b2g:kanikani This should allow to call app.lauch() and open the Settings app when clicking in the UtilityTray icon (although the frame is not loaded correctly yet, we'll need to wait for bug 1261030)
Attachment #8739030 - Flags: review?(bfrancis)
Comment on attachment 8739030 [details] [review] [gaia] albertopq:1262391-add-launch > mozilla-b2g:kanikani Why do we need to get an "app" by its manifest URL and "launch" it to view the settings UI? Why can't we just: window.open('chrome://gaia/content/settings'); Or even: window.open('about:settings'); There's not much point in removing the app registry and apps API from Gecko if we just re-implement it in Gaia is there?
Attachment #8739030 - Flags: review?(bfrancis)
Thanks for your comments, Ben. The main reason I'm keeping the launch method is for, as we talked before, touch the code as little as possible. window.open never worked in the System domain (it replaces the system with the url that is being opened, so the phone breaks), it always was triggered from other apps (domains) and intercepted by the System. The work that will require changing all the code for working on that way is considerably bigger than this 3 liner patch. I would prefer to move to the new MozApps replacement from something that works. We are not reimplementing the apps registry in Gaia, but finding a short term solution for making the current code work. If you have an alternative feasible on the time we have, I'll be happy to review it. I agree that the final goal is to read the 'apps' from some places storage (we don't have that yet) and to launch those sites via window.open (doesn't work at the moment from the chrome://gaia domain), but if we can make things work and then iterate over it, we'll probably move faster (being able to configure wifi can help to others test stuff, for example) and at least we have plan B that works if we don't have time. What do you think? (In reply to Ben Francis [:benfrancis] from comment #3) > Comment on attachment 8739030 [details] [review] > [gaia] albertopq:1262391-add-launch > mozilla-b2g:kanikani > > Why do we need to get an "app" by its manifest URL and "launch" it to view > the settings UI? > > Why can't we just: > > window.open('chrome://gaia/content/settings'); > > Or even: > > window.open('about:settings'); > > There's not much point in removing the app registry and apps API from Gecko > if we just re-implement it in Gaia is there?
Flags: needinfo?(bfrancis)
Comment on attachment 8739030 [details] [review] [gaia] albertopq:1262391-add-launch > mozilla-b2g:kanikani OK, fair enough, if this enables us to configure WiFi then I guess it's worth a temporary hack to get things moving. I hope we get chance to do the real refactoring work to get rid of "apps" in the chrome altogether. I will try to make some more progress with Places. Thanks Alberto.
Flags: needinfo?(bfrancis)
Attachment #8739030 - Flags: review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Blocks: 1263632
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: