Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,48 @@
(function() {
'use strict';
/**
* Take an app from a DOMRequest and serialize it to send back
* to the client.
* @return {Object} App representation.
*/
function serialize(app) {
return {
installOrigin: app.installOrigin,
installTime: app.installTime,
// sync transfer of the entire manifest is slow so for now opt in to the
// fields we actually need internally.
manifest: {
entry_points: app.manifest.entry_points,
activities: app.manifest.activities
},
manifestURL: app.manifestURL,
origin: app.origin,
receipts: app.receipts
};
}
var ObjectCache = window.wrappedJSObject.ObjectCache;
var req = navigator.mozApps.mgmt.getAll();
req.onsuccess = function(evt) {
var result = evt.target.result;
var apps = result.map(function(app) {
var id = ObjectCache._inst.set(app);
var obj = serialize(app);
obj._id = id;
return obj;
});
marionetteScriptFinished({
result: apps
});
};
req.onerror = function(evt) {
marionetteScriptFinished({
error: req.error.name
});
};
})();

View file

@ -0,0 +1,42 @@
(function() {
/* global marionetteScriptFinished */
'use strict';
/**
* Take an app from a DOMRequest and serialize it to send back
* to the client.
* @return {Object} App representation.
*/
function serialize(app) {
return {
installOrigin: app.installOrigin,
installTime: app.installTime,
// sync transfer of the entire manifest is slow so for now opt in to the
// fields we actually need internally.
manifest: {
entry_points: app.manifest.entry_points
},
manifestURL: app.manifestURL,
origin: app.origin,
receipts: app.receipts
};
}
var ObjectCache = window.wrappedJSObject.ObjectCache;
var req = navigator.mozApps.getSelf();
req.onsuccess = function(evt) {
var app = evt.target.result;
var id = ObjectCache._inst.set(app);
var obj = serialize(app);
obj._id = id;
marionetteScriptFinished({ result: obj });
};
req.onerror = function(evt) {
marionetteScriptFinished({ error: req.error.name });
};
})();

View file

@ -0,0 +1,64 @@
(function() {
'use strict';
if (window.wrappedJSObject.ObjectCache !== undefined) {
// Don't redefine ObjectCache!
return;
}
/**
* @constructor
*/
function ObjectCache() {
}
ObjectCache.prototype = {
/**
* Find the gecko object that corresponds to some node object.
* @param {string} key Some id.
*/
get: function(key) {
return this._cache[key];
},
/**
* Add some gecko object to the client's object cache.
* @param {Object} obj Gecko object.
* @param {string} opt_key Optional key to store obj on.
* @return {string} The key that we end up storing obj on.
*/
set: function(obj, opt_key) {
var key = opt_key || this.getNextId();
this._cache[key] = obj;
return key;
},
/**
* Generate a new, unique id.
* @return {string}
*/
getNextId: function() {
this._nextId += 1;
return this._nextId.toString();
},
/**
* Map from id to gecko objects.
* @type {Object<string, Object>}
*/
_cache: {},
/**
* @type {number} Count of number of ids we've generated.
*/
_nextId: 0
};
ObjectCache._inst = new ObjectCache();
window.wrappedJSObject.ObjectCache = ObjectCache;
})();