Handle proxy and nativeMessaging permission disabling + enabling

This commit is contained in:
Lesley Norton
2021-11-29 16:16:46 -06:00
parent ed63f18cf1
commit 1b165aebb5
5 changed files with 30 additions and 11 deletions
+8 -1
View File
@@ -382,6 +382,13 @@ window.assignManager = {
return currentContainerState && currentContainerState.isIsolated;
},
maybeAddProxyListeners() {
if (browser.proxy) {
browser.proxy.onRequest.addListener(this.handleProxifiedRequest, {urls: ["<all_urls>"]});
}
return;
},
init() {
browser.contextMenus.onClicked.addListener((info, tab) => {
info.bookmarkId ?
@@ -390,7 +397,7 @@ window.assignManager = {
});
// Before anything happens we decide if the request should be proxified
browser.proxy.onRequest.addListener(this.handleProxifiedRequest, {urls: ["<all_urls>"]});
this.maybeAddProxyListeners();
// Before a request is handled by the browser we decide if we should
// route through a different container