diff options
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom')
3 files changed, 0 insertions, 147 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/addon.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/addon.js deleted file mode 100644 index 815f8ed..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/addon.js +++ /dev/null @@ -1,80 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -'use strict'; - -const {Cc, Ci, Cu} = require("chrome"); -const {AddonManager, AddonAuthor} = require("../utils/addonmanager"); -const DO_NOTHING = function(){}; - -// https://developer.mozilla.org/en/Addons/Add-on_Manager/Addon -function Addon(options) { - - this.appDisabled = !!options.appDisabled || false; - this.blocklistState = (options.blocked) ? 2 : 0; - if (options.creator) { - this.creator = new AddonAuthor(options.creator.name); - } - this.id = options.id; - if (typeof options.isActive != "undefined") this.isActive = !!options.isActive; - if (typeof options.isCompatible != "undefined") this.isCompatible = !!options.isCompatible; - if (typeof options.isPlatformCompatible != "undefined") this.isPlatformCompatible = !!options.isPlatformCompatible; - this.name = options.name || ""; - //this.pendingOperations = - this.description = options.description || ""; - if (options.iconURL) this.iconURL = options.iconURL; - - // METHODS - this.uninstall = function() { - options.uninstall && options.uninstall(); - }; - this.cancelUninstall = function() { - options.cancelUninstall && options.cancelUninstall(); - }; - - if (options.getResourceURI) { - this.getResourceURI = function(aPath) { - return options.getResourceURI(aPath); - }; - this.getXPI = function() { - return options.getResourceURI("").QueryInterface(Ci.nsIFileURL).file; - } - } - - return this; -}; - -Addon.prototype = { - // req'd - appDisabled: false, - blocklistState: 0, - creator: null, - id: null, - isActive: true, - isCompatible: true, - isPlatformCompatible: true, - name: null, - pendingOperations: AddonManager.PENDING_NONE, - permissions: AddonManager.PERM_CAN_UNINSTALL, - providesUpdatesSecurely: false, - scope: AddonManager.SCOPE_PROFILE, - type: null, - userDisabled: false, - version: null, - - //not reqd - applyBackgroundUpdates: AddonManager.AUTOUPDATE_DISABLE, - contributors: [], - description: "", - translators: [], - sourceURI: null, - - - // METHODS - uninstall: DO_NOTHING, - findUpdates: DO_NOTHING, - cancelUninstall: DO_NOTHING, - hasResource: DO_NOTHING -}; - -exports.Addon = Addon; diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/manager.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/manager.js deleted file mode 100644 index cc9388e..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/manager.js +++ /dev/null @@ -1,15 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -'use strict'; - -const {AddonManager, AddonManagerPrivate} = require("../utils/addonmanager"); -const Addon = require("addon").Addon; - -exports.getAddonByID = exports.getAddonById = function(aID, aCallback) { - // get the addon obj - AddonManager.getAddonByID(aID, function (addon) { - // return a wrapped addon - aCallback(new Addon(addon)); - }); -}; diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/provider.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/provider.js deleted file mode 100644 index 681dcd9..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/aom/provider.js +++ /dev/null @@ -1,52 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -'use strict'; - -const unload = require("sdk/system/unload").when; - -const {AddonManager, AddonManagerPrivate, AddonType} = require("../utils/addonmanager"); - -var defaultUIPriority = 6001; // this increases when it is used - -exports.AddonProvider = function(options) { - var types = null; - - // AddonManagerPrivate.AddonType DNE in Gecko (FF) < 6 - if (AddonType) { - types = [new AddonType( - options.type, // TODO: RANDOMIZE? - null, - options.localeKey, - AddonManager.VIEW_TYPE_LIST, - options.uiPriority || defaultUIPriority++)]; - } - - var provider = { - getAddonByID: function(aId, aCallback) { - aCallback(options.getAddonByID(aId)); - }, - - getAddonsByTypes: function(aTypes, aCallback) { - if (aTypes && aTypes.indexOf(options.type) < 0) { - // not the right type, return nothing - aCallback([]); - } - else { - // the right type, return all addons - aCallback(options.getAddons()); - } - }, - - getInstallsByTypes: function(aTypes, aCallback) { - aCallback([]); - } - }; - AddonManagerPrivate.registerProvider(provider, types); - - unload(function() { - AddonManagerPrivate.unregisterProvider(provider); - }); - - return this; -}; |