diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-06 12:30:20 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-06 12:30:20 +0100 |
commit | e25ad543952b5afc13181aaebef9c5951fc27be0 (patch) | |
tree | 456a1359b3e5f810319edd423dd5cc5a1e22ada5 /toolkit/components/webextensions/ext-c-extension.js | |
parent | 74533a843277c3687c749989ed1522354d1054d2 (diff) | |
parent | 5dba1ebe8498286762873fff0016f35f3e14d2d5 (diff) | |
download | UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar.gz UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar.lz UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.tar.xz UXP-e25ad543952b5afc13181aaebef9c5951fc27be0.zip |
Merge branch 'master' into Basilisk-releasev2019.03.08
Diffstat (limited to 'toolkit/components/webextensions/ext-c-extension.js')
-rw-r--r-- | toolkit/components/webextensions/ext-c-extension.js | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/toolkit/components/webextensions/ext-c-extension.js b/toolkit/components/webextensions/ext-c-extension.js deleted file mode 100644 index 669309bea..000000000 --- a/toolkit/components/webextensions/ext-c-extension.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; - -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); - -function extensionApiFactory(context) { - return { - extension: { - getURL(url) { - return context.extension.baseURI.resolve(url); - }, - - get lastError() { - return context.lastError; - }, - - get inIncognitoContext() { - return context.incognito; - }, - }, - }; -} - -extensions.registerSchemaAPI("extension", "addon_child", extensionApiFactory); -extensions.registerSchemaAPI("extension", "content_child", extensionApiFactory); -extensions.registerSchemaAPI("extension", "addon_child", context => { - return { - extension: { - getViews: function(fetchProperties) { - let result = Cu.cloneInto([], context.cloneScope); - - for (let view of context.extension.views) { - if (!view.active) { - continue; - } - if (!context.principal.subsumes(view.principal)) { - continue; - } - - if (fetchProperties !== null) { - if (fetchProperties.type !== null && view.viewType != fetchProperties.type) { - continue; - } - - if (fetchProperties.windowId !== null && view.windowId != fetchProperties.windowId) { - continue; - } - } - - result.push(view.contentWindow); - } - - return result; - }, - }, - }; -}); |