зеркало из https://github.com/mozilla/gecko-dev.git
Bug 760748: Add the category of the application to the desktop entry file; r=fabrice
This commit is contained in:
Родитель
f18740e3c5
Коммит
50ba6dc5b5
|
@ -135,11 +135,13 @@ WebappsRegistry.prototype = {
|
|||
Services.DOMRequest.fireError(request, "INVALID_MANIFEST");
|
||||
} else {
|
||||
let receipts = (aParams && aParams.receipts && Array.isArray(aParams.receipts)) ? aParams.receipts : [];
|
||||
let categories = (aParams && aParams.categories && Array.isArray(aParams.categories)) ? aParams.categories : [];
|
||||
cpmm.sendAsyncMessage("Webapps:Install", { app: { installOrigin: installOrigin,
|
||||
origin: this._getOrigin(aURL),
|
||||
manifestURL: aURL,
|
||||
manifest: manifest,
|
||||
receipts: receipts },
|
||||
receipts: receipts,
|
||||
categories: categories },
|
||||
from: installURL,
|
||||
oid: this._id,
|
||||
requestID: requestID });
|
||||
|
@ -191,8 +193,11 @@ WebappsRegistry.prototype = {
|
|||
|
||||
let receipts = (aParams && aParams.receipts &&
|
||||
Array.isArray(aParams.receipts)) ? aParams.receipts : [];
|
||||
let categories = (aParams && aParams.categories &&
|
||||
Array.isArray(aParams.categories)) ? aParams.categories : [];
|
||||
cpmm.sendAsyncMessage("Webapps:InstallPackage", { url: aPackageURL,
|
||||
receipts: receipts,
|
||||
categories: categories,
|
||||
requestID: requestID,
|
||||
oid: this._id,
|
||||
from: this._window.location.href,
|
||||
|
|
|
@ -502,7 +502,7 @@ let DOMApplicationRegistry = {
|
|||
}
|
||||
// Build a data structure to call the webapps confirmation dialog :
|
||||
// - load the manifest from the zip
|
||||
// - set data.app.(origin, install_origin, manifestURL, manifest, receipts)
|
||||
// - set data.app.(origin, install_origin, manifestURL, manifest, receipts, categories)
|
||||
// - call notifyObservers(this, "webapps-ask-install", JSON.stringify(msg));
|
||||
let msg = {
|
||||
from: aData.from,
|
||||
|
@ -513,7 +513,8 @@ let DOMApplicationRegistry = {
|
|||
installOrigin: aData.installOrigin,
|
||||
origin: "app://" + id,
|
||||
manifestURL: manifestURL,
|
||||
receipts: aData.receipts
|
||||
receipts: aData.receipts,
|
||||
categories: aData.categories
|
||||
}
|
||||
}
|
||||
let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"]
|
||||
|
|
|
@ -74,7 +74,10 @@ interface mozIDOMApplicationRegistry : nsISupports
|
|||
*
|
||||
* @param manifestUrl : the URL of the webapps manifest.
|
||||
* @param parameters : A structure with optional information.
|
||||
* { receipts: ... } will be used to specify the payment receipts for this installation.
|
||||
* {
|
||||
* receipts: ... Will be used to specify the payment receipts for this installation.
|
||||
* categories: ... Will be used to specify the categories of the webapp.
|
||||
* }
|
||||
* @returns : A DOMRequest object, returning the app object in |result| if install succeeds.
|
||||
*/
|
||||
nsIDOMDOMRequest install(in DOMString manifestUrl, [optional] in jsval parameters);
|
||||
|
@ -100,7 +103,10 @@ interface mozIDOMApplicationRegistry : nsISupports
|
|||
*
|
||||
* @param packageUrl : the URL of the webapps manifest.
|
||||
* @param parameters : A structure with optional information.
|
||||
* { receipts: ... } will be used to specify the payment receipts for this installation.
|
||||
* {
|
||||
* receipts: ... Will be used to specify the payment receipts for this installation.
|
||||
* categories: ... Will be used to specify the categories of the webapp.
|
||||
* }
|
||||
* @returns : A DOMRequest object, returning the app object in |result| if install succeeds.
|
||||
*/
|
||||
nsIDOMDOMRequest installPackage(in DOMString packageUrl, [optional] in jsval parameters);
|
||||
|
|
Загрузка…
Ссылка в новой задаче