Closed Bug 898000 Opened 11 years ago Closed 11 years ago

Add getIconAsDataURL in webapps actor

Categories

(DevTools Graveyard :: WebIDE, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: ochameau, Assigned: ochameau)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

In order to help fetching various device contents like app icon, manifest,...
we would need a way to fetch these content from the remote to the client as they are accessible via URL that only works on the remote, like app://.../manifest.webapp.
Attached patch Add a url resolver actor (obsolete) — Splinter Review
I haven't added the actor to the browser actor list
in order to only load it when we will start using it.

That's so nice to do such feature without using any chrome/xpcom \o/
Attachment #781026 - Flags: review?(paul)
What about registering the actor in shell.js?
When I resolve:

"app://settings.gaiamobile.org/style/icons/60/Settings.png"

the mimetype is application/xml
How do we handle 404?
I still don't see this as a clean way to do things. It brings back memories of RPC.

In the current design, actors are entities with meaningful lifetimes and a related client that communicates with them through a collection of requests that operate on their state. For instance, the tab actor is responsible for intermediating with the remote tab and has methods that the tab client can use to manipulate the state of the tab, such as reload, navigateTo, etc.

This new actor is only capable of making stateless requests on behalf of various clients that could presumably grow a similar capability, if not return the data as part of other responses. For example, a hypothetical webapp actor could respond to an "icon" request, or even return the icon in the response of an "info" or "attach" request.
Comment on attachment 781026 [details] [diff] [review]
Add a url resolver actor

I talked to Panos. We need to move this at the app actor level. We should implement a `getIconAsDataURL()` method. Sorry :)
Attachment #781026 - Flags: review?(paul) → review-
Summary: Add a url resolver actor → Add getIconAsDataURL in webapps actor
Attachment #781026 - Attachment is obsolete: true
Attachment #782664 - Flags: review?(paul)
Depends on: 899177
Comment on attachment 782664 [details] [diff] [review]
Add getIconAsDataURL in webapps actor

Thanks Alex!

r=me if you reset the pref once the test is finished.
Attachment #782664 - Flags: review?(paul) → review+
Comment on attachment 783344 [details] [diff] [review]
Reset the pref to the original value during tests

Carrying r+ after having addressed review comment.
Attachment #783344 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/213244df4e6e
Assignee: nobody → poirot.alex
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/213244df4e6e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: