зеркало из https://github.com/mozilla/gecko-dev.git
Bug 784805 - Add a name field to mozIApplication and set it from the manifest r=fabrice
This commit is contained in:
Родитель
ed8da5c11e
Коммит
c2faa7ed89
|
@ -24,6 +24,7 @@ let AppsUtils = {
|
|||
// Clones a app, without the manifest.
|
||||
cloneAppObject: function cloneAppObject(aApp) {
|
||||
return {
|
||||
name: aApp.name,
|
||||
installOrigin: aApp.installOrigin,
|
||||
origin: aApp.origin,
|
||||
receipts: aApp.receipts ? JSON.parse(JSON.stringify(aApp.receipts)) : null,
|
||||
|
|
|
@ -179,6 +179,7 @@ let DOMApplicationRegistry = {
|
|||
let app = this.webapps[aId];
|
||||
this._readManifests([{ id: aId }], (function registerManifest(aResult) {
|
||||
let manifest = aResult[0].manifest;
|
||||
app.name = manifest.name;
|
||||
this._registerSystemMessages(manifest, app);
|
||||
this._registerActivities(manifest, app);
|
||||
}).bind(this));
|
||||
|
@ -368,6 +369,7 @@ let DOMApplicationRegistry = {
|
|||
this.webapps[id] = appObject;
|
||||
|
||||
appObject.status = "installed";
|
||||
appObject.name = app.manifest.name;
|
||||
|
||||
let manifest = new DOMApplicationManifest(app.manifest, app.origin);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* We expose Gecko-internal helpers related to "web apps" through this
|
||||
* sub-interface.
|
||||
*/
|
||||
[scriptable, uuid(764e8930-ff06-4f23-9a6a-8523b93ac09f)]
|
||||
[scriptable, uuid(efe22f80-f973-11e1-8a00-b7888ac0d2b9)]
|
||||
interface mozIApplication: mozIDOMApplication
|
||||
{
|
||||
/* Return true if this app has |permission|. */
|
||||
|
@ -22,4 +22,7 @@ interface mozIApplication: mozIDOMApplication
|
|||
|
||||
/* Returns the local id of the app (not the uuid used for sync). */
|
||||
readonly attribute unsigned long localId;
|
||||
|
||||
/* Name copied from the manifest */
|
||||
readonly attribute DOMString name;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче