Closed
Bug 919981
Opened 11 years ago
Closed 11 years ago
Dispatch app (un)install events via the webapps actor
Categories
(DevTools Graveyard :: WebIDE, defect, P1)
DevTools Graveyard
WebIDE
Tracking
(firefox26 verified, firefox27 verified, b2g-v1.2 fixed)
VERIFIED
FIXED
Firefox 27
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 file, 3 obsolete files)
11.37 KB,
patch
|
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
So far, we can listen for app being opened/closed, and we can list installed apps, but it would also be usefull to receive events when an app is installed or uninstalled. That would help managing the list of installed apps in the device panel.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #809119 -
Attachment is obsolete: true
Assignee | ||
Comment 3•11 years ago
|
||
Updated•11 years ago
|
Priority: -- → P1
Whiteboard: [needed-in-aurora-26]
Updated•11 years ago
|
Attachment #809235 -
Flags: review?(fabrice)
Updated•11 years ago
|
Assignee: nobody → poirot.alex
Comment 4•11 years ago
|
||
Comment on attachment 809235 [details] [diff] [review]
Proper tests and also fire such even when installing an app via the actor
Review of attachment 809235 [details] [diff] [review]:
-----------------------------------------------------------------
It's a bit sad to add new observer notifications, but we'll fix that later.
::: dom/apps/src/Webapps.jsm
@@ +2077,5 @@
> this._saveApps((function() {
> this.updateAppHandlers(null, aManifest, appObject);
> this.broadcastMessage("Webapps:AddApp", { id: aId, app: appObject });
> + let appClone = AppsUtils.cloneAppObject(app);
> + Services.obs.notifyObservers(null, "webapps-installed", JSON.stringify(appClone));
Since you only need the manifest url in webapps.js, don't use cloneAppObject which is expensive, but just create an object with the manifest url.
::: toolkit/devtools/server/actors/webapps.js
@@ +189,5 @@
> oid: "foo",
> requestID: "bar"
> });
>
> + Services.obs.notifyObservers(null, "webapps-installed", JSON.stringify({manifestURL: aApp.manifestURL}));
nit: is that < 80 chars?
Attachment #809235 -
Flags: review?(fabrice) → feedback+
Updated•11 years ago
|
Whiteboard: [needed-in-aurora-26]
Comment 5•11 years ago
|
||
Any reason to send an app JSON object? If we only need the manifestURL, why not just send it?
Comment 6•11 years ago
|
||
Attachment #809235 -
Attachment is obsolete: true
Attachment #812708 -
Flags: review?(fabrice)
Comment 7•11 years ago
|
||
Comment on attachment 812708 [details] [diff] [review]
Patch v2
Review of attachment 812708 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits addressed
::: dom/apps/src/Webapps.jsm
@@ +2077,5 @@
> this._saveApps((function() {
> this.updateAppHandlers(null, aManifest, appObject);
> this.broadcastMessage("Webapps:AddApp", { id: aId, app: appObject });
> + Services.obs.notifyObservers(null, "webapps-installed",
> + JSON.stringify({manifestURL: appObject.manifestURL}));
nit: { manifestURL: appObject.manifestURL }
@@ +2210,5 @@
> this._saveApps((function() {
> this.broadcastMessage("Webapps:AddApp", { id: id, app: appObject });
> this.broadcastMessage("Webapps:Install:Return:OK", aData);
> + Services.obs.notifyObservers(null, "webapps-installed",
> + JSON.stringify({manifestURL: app.manifestURL}));
idem
::: toolkit/devtools/server/actors/webapps.js
@@ +190,5 @@
> requestID: "bar"
> });
>
> + Services.obs.notifyObservers(null, "webapps-installed",
> + JSON.stringify({manifestURL: aApp.manifestURL}));
nit: { manifestURL: aApp.manifestURL }
Comment 8•11 years ago
|
||
Comment on attachment 812708 [details] [diff] [review]
Patch v2
Review of attachment 812708 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits addressed
::: dom/apps/src/Webapps.jsm
@@ +2077,5 @@
> this._saveApps((function() {
> this.updateAppHandlers(null, aManifest, appObject);
> this.broadcastMessage("Webapps:AddApp", { id: aId, app: appObject });
> + Services.obs.notifyObservers(null, "webapps-installed",
> + JSON.stringify({manifestURL: appObject.manifestURL}));
nit: { manifestURL: appObject.manifestURL }
@@ +2210,5 @@
> this._saveApps((function() {
> this.broadcastMessage("Webapps:AddApp", { id: id, app: appObject });
> this.broadcastMessage("Webapps:Install:Return:OK", aData);
> + Services.obs.notifyObservers(null, "webapps-installed",
> + JSON.stringify({manifestURL: app.manifestURL}));
idem
::: toolkit/devtools/server/actors/webapps.js
@@ +190,5 @@
> requestID: "bar"
> });
>
> + Services.obs.notifyObservers(null, "webapps-installed",
> + JSON.stringify({manifestURL: aApp.manifestURL}));
nit: { manifestURL: aApp.manifestURL }
Attachment #812708 -
Flags: review?(fabrice) → review+
Comment 9•11 years ago
|
||
Updated•11 years ago
|
Keywords: checkin-needed
Whiteboard: [land-in-fx-team]
Updated•11 years ago
|
Attachment #812708 -
Attachment is obsolete: true
Comment 10•11 years ago
|
||
Updated•11 years ago
|
Whiteboard: [fixed-in-fx-team] → [needed-in-aurora-26]
Comment 11•11 years ago
|
||
Comment on attachment 813591 [details] [diff] [review]
patch v2.1 - patch to land
[Approval Request Comment]
Bug caused by (feature/regressing bug #): new feature (app manager)
User impact if declined: installed apps won't show up
Testing completed (on m-c, etc.): fx-team
Risk to taking this patch (and alternatives if risky): low
String or IDL/UUID changes made by this patch: none
Attachment #813591 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
Whiteboard: [needed-in-aurora-26] → [waiting-for-aurora-approval]
Comment 12•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Updated•11 years ago
|
Attachment #813591 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 13•11 years ago
|
||
status-b2g-v1.2:
--- → fixed
status-firefox26:
--- → fixed
status-firefox27:
--- → fixed
Whiteboard: [waiting-for-aurora-approval]
Comment 14•11 years ago
|
||
Verified as fixed on latest Aurora 27.0a2 (20131112004004) and Firefox 26 beta 4 (20131111154639) using Win 7 64-bit, Ubuntu 13.04 32-bit and Mac OS X 10.6.8.
Updated•11 years ago
|
QA Contact: petruta.rasa
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•5 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•