summaryrefslogtreecommitdiffstats
path: root/browser/components/extensions/parent
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /browser/components/extensions/parent
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/extensions/parent')
-rw-r--r--browser/components/extensions/parent/ext-browser.js2
-rw-r--r--browser/components/extensions/parent/ext-browserAction.js4
-rw-r--r--browser/components/extensions/parent/ext-chrome-settings-overrides.js2
-rw-r--r--browser/components/extensions/parent/ext-commands.js2
-rw-r--r--browser/components/extensions/parent/ext-devtools-panels.js2
-rw-r--r--browser/components/extensions/parent/ext-devtools.js2
-rw-r--r--browser/components/extensions/parent/ext-history.js2
-rw-r--r--browser/components/extensions/parent/ext-menus.js4
-rw-r--r--browser/components/extensions/parent/ext-omnibox.js6
-rw-r--r--browser/components/extensions/parent/ext-pageAction.js6
-rw-r--r--browser/components/extensions/parent/ext-search.js2
-rw-r--r--browser/components/extensions/parent/ext-sidebarAction.js2
-rw-r--r--browser/components/extensions/parent/ext-tabs.js16
-rw-r--r--browser/components/extensions/parent/ext-topSites.js2
-rw-r--r--browser/components/extensions/parent/ext-url-overrides.js2
-rw-r--r--browser/components/extensions/parent/ext-windows.js2
16 files changed, 31 insertions, 27 deletions
diff --git a/browser/components/extensions/parent/ext-browser.js b/browser/components/extensions/parent/ext-browser.js
index 355f4f0668..7b01d15101 100644
--- a/browser/components/extensions/parent/ext-browser.js
+++ b/browser/components/extensions/parent/ext-browser.js
@@ -108,7 +108,7 @@ global.clickModifiersFromEvent = event => {
global.waitForTabLoaded = (tab, url) => {
return new Promise(resolve => {
windowTracker.addListener("progress", {
- onLocationChange(browser, webProgress, request, locationURI, flags) {
+ onLocationChange(browser, webProgress, request, locationURI) {
if (
webProgress.isTopLevel &&
browser.ownerGlobal.gBrowser.getTabForBrowser(browser) == tab &&
diff --git a/browser/components/extensions/parent/ext-browserAction.js b/browser/components/extensions/parent/ext-browserAction.js
index 4122856104..521a1195bb 100644
--- a/browser/components/extensions/parent/ext-browserAction.js
+++ b/browser/components/extensions/parent/ext-browserAction.js
@@ -95,7 +95,7 @@ this.browserAction = class extends ExtensionAPIPersistent {
return browserActionMap.get(extension);
}
- async onManifestEntry(entryName) {
+ async onManifestEntry() {
let { extension } = this;
let options =
@@ -341,7 +341,7 @@ this.browserAction = class extends ExtensionAPIPersistent {
);
},
- onBeforeCommand: (event, node) => {
+ onBeforeCommand: event => {
this.lastClickInfo = {
button: event.button || 0,
modifiers: clickModifiersFromEvent(event),
diff --git a/browser/components/extensions/parent/ext-chrome-settings-overrides.js b/browser/components/extensions/parent/ext-chrome-settings-overrides.js
index 2e3a285014..1fbb794b51 100644
--- a/browser/components/extensions/parent/ext-chrome-settings-overrides.js
+++ b/browser/components/extensions/parent/ext-chrome-settings-overrides.js
@@ -259,7 +259,7 @@ this.chrome_settings_overrides = class extends ExtensionAPI {
await chrome_settings_overrides.removeEngine(id);
}
- async onManifestEntry(entryName) {
+ async onManifestEntry() {
let { extension } = this;
let { manifest } = extension;
let homepageUrl = manifest.chrome_settings_overrides.homepage;
diff --git a/browser/components/extensions/parent/ext-commands.js b/browser/components/extensions/parent/ext-commands.js
index 88e7dae307..328f05a802 100644
--- a/browser/components/extensions/parent/ext-commands.js
+++ b/browser/components/extensions/parent/ext-commands.js
@@ -42,7 +42,7 @@ this.commands = class extends ExtensionAPIPersistent {
return ExtensionShortcuts.removeCommandsFromStorage(extensionId);
}
- async onManifestEntry(entryName) {
+ async onManifestEntry() {
let shortcuts = new ExtensionShortcuts({
extension: this.extension,
onCommand: name => this.emit("command", name),
diff --git a/browser/components/extensions/parent/ext-devtools-panels.js b/browser/components/extensions/parent/ext-devtools-panels.js
index 9f0dba5c25..6b83ea5dbb 100644
--- a/browser/components/extensions/parent/ext-devtools-panels.js
+++ b/browser/components/extensions/parent/ext-devtools-panels.js
@@ -593,7 +593,7 @@ this.devtools_panels = class extends ExtensionAPI {
context,
name: "devtools.panels.elements.onSelectionChanged",
register: fire => {
- const listener = eventName => {
+ const listener = () => {
fire.async();
};
toolboxSelectionObserver.on("selectionChanged", listener);
diff --git a/browser/components/extensions/parent/ext-devtools.js b/browser/components/extensions/parent/ext-devtools.js
index 98efd25489..da6d1fdc2d 100644
--- a/browser/components/extensions/parent/ext-devtools.js
+++ b/browser/components/extensions/parent/ext-devtools.js
@@ -406,7 +406,7 @@ this.devtools = class extends ExtensionAPI {
this._uninitialize();
}
- getAPI(context) {
+ getAPI() {
return {
devtools: {},
};
diff --git a/browser/components/extensions/parent/ext-history.js b/browser/components/extensions/parent/ext-history.js
index b7e24aecaa..c47e1090dd 100644
--- a/browser/components/extensions/parent/ext-history.js
+++ b/browser/components/extensions/parent/ext-history.js
@@ -95,7 +95,7 @@ function executeAsyncQuery(historyQuery, options, resultConverter) {
)
);
},
- handleCompletion(reason) {
+ handleCompletion() {
resolve(results);
},
});
diff --git a/browser/components/extensions/parent/ext-menus.js b/browser/components/extensions/parent/ext-menus.js
index 74ce398b48..a5b27bff7d 100644
--- a/browser/components/extensions/parent/ext-menus.js
+++ b/browser/components/extensions/parent/ext-menus.js
@@ -312,7 +312,7 @@ var gMenuBuilder = {
return this.customizeElement(element, item, contextData);
},
- createMenuElement(doc, item) {
+ createMenuElement(doc) {
let element = doc.createXULElement("menu");
// Menu elements need to have a menupopup child for its menu items.
let menupopup = doc.createXULElement("menupopup");
@@ -1084,7 +1084,7 @@ const menuTracker = {
libraryTracker.uninit(this.cleanupLibrary);
},
- observe(subject, topic, data) {
+ observe(subject) {
subject = subject.wrappedJSObject;
gMenuBuilder.build(subject);
},
diff --git a/browser/components/extensions/parent/ext-omnibox.js b/browser/components/extensions/parent/ext-omnibox.js
index 363db67325..d8d5f64941 100644
--- a/browser/components/extensions/parent/ext-omnibox.js
+++ b/browser/components/extensions/parent/ext-omnibox.js
@@ -15,7 +15,7 @@ this.omnibox = class extends ExtensionAPIPersistent {
PERSISTENT_EVENTS = {
onInputStarted({ fire }) {
let { extension } = this;
- let listener = eventName => {
+ let listener = () => {
fire.sync();
};
extension.on(ExtensionSearchHandler.MSG_INPUT_STARTED, listener);
@@ -30,7 +30,7 @@ this.omnibox = class extends ExtensionAPIPersistent {
},
onInputCancelled({ fire }) {
let { extension } = this;
- let listener = eventName => {
+ let listener = () => {
fire.sync();
};
extension.on(ExtensionSearchHandler.MSG_INPUT_CANCELLED, listener);
@@ -90,7 +90,7 @@ this.omnibox = class extends ExtensionAPIPersistent {
},
};
- onManifestEntry(entryName) {
+ onManifestEntry() {
let { extension } = this;
let { manifest } = extension;
diff --git a/browser/components/extensions/parent/ext-pageAction.js b/browser/components/extensions/parent/ext-pageAction.js
index aa45be8256..7dd07bd282 100644
--- a/browser/components/extensions/parent/ext-pageAction.js
+++ b/browser/components/extensions/parent/ext-pageAction.js
@@ -27,7 +27,7 @@ let pageActionMap = new WeakMap();
class PageAction extends PageActionBase {
constructor(extension, buttonDelegate) {
- let tabContext = new TabContext(tab => this.getContextData(null));
+ let tabContext = new TabContext(() => this.getContextData(null));
super(tabContext, extension);
this.buttonDelegate = buttonDelegate;
}
@@ -72,7 +72,7 @@ this.pageAction = class extends ExtensionAPIPersistent {
BrowserUsageTelemetry.recordWidgetChange(makeWidgetId(id), null, "addon");
}
- async onManifestEntry(entryName) {
+ async onManifestEntry() {
let { extension } = this;
let options = extension.manifest.page_action;
@@ -120,7 +120,7 @@ this.pageAction = class extends ExtensionAPIPersistent {
iconURL: this.action.getProperty(null, "icon"),
pinnedToUrlbar: this.action.getPinned(),
disabled: !this.action.getProperty(null, "enabled"),
- onCommand: (event, buttonNode) => {
+ onCommand: event => {
this.handleClick(event.target.ownerGlobal, {
button: event.button || 0,
modifiers: clickModifiersFromEvent(event),
diff --git a/browser/components/extensions/parent/ext-search.js b/browser/components/extensions/parent/ext-search.js
index 4fe7a096f4..cd65335f48 100644
--- a/browser/components/extensions/parent/ext-search.js
+++ b/browser/components/extensions/parent/ext-search.js
@@ -40,7 +40,7 @@ this.search = class extends ExtensionAPI {
let defaultEngine = await Services.search.getDefault();
return Promise.all(
visibleEngines.map(async engine => {
- let favIconUrl = engine.getIconURL();
+ let favIconUrl = await engine.getIconURL();
// Convert moz-extension:-URLs to data:-URLs to make sure that
// extensions can see icons from other extensions, even if they
// are not web-accessible.
diff --git a/browser/components/extensions/parent/ext-sidebarAction.js b/browser/components/extensions/parent/ext-sidebarAction.js
index 648b34e557..197456abd9 100644
--- a/browser/components/extensions/parent/ext-sidebarAction.js
+++ b/browser/components/extensions/parent/ext-sidebarAction.js
@@ -28,7 +28,7 @@ this.sidebarAction = class extends ExtensionAPI {
return sidebarActionMap.get(extension);
}
- onManifestEntry(entryName) {
+ onManifestEntry() {
let { extension } = this;
extension.once("ready", this.onReady.bind(this));
diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js
index 53d470e6f1..128a42439b 100644
--- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js
@@ -82,7 +82,7 @@ let tabListener = {
}
},
- onLocationChange(browser, webProgress, request, locationURI, flags) {
+ onLocationChange(browser, webProgress) {
if (webProgress.isTopLevel) {
let { gBrowser } = browser.ownerGlobal;
let nativeTab = gBrowser.getTabForBrowser(browser);
@@ -356,7 +356,7 @@ this.tabs = class extends ExtensionAPIPersistent {
return windowId;
}
- function matchFilters(tab, changed) {
+ function matchFilters(tab) {
if (!filterProps) {
return true;
}
@@ -663,7 +663,7 @@ this.tabs = class extends ExtensionAPIPersistent {
onReplaced: new EventManager({
context,
name: "tabs.onReplaced",
- register: fire => {
+ register: () => {
return () => {};
},
}).api(),
@@ -683,7 +683,7 @@ this.tabs = class extends ExtensionAPIPersistent {
}).api(),
create(createProperties) {
- return new Promise((resolve, reject) => {
+ return new Promise(resolve => {
let window =
createProperties.windowId !== null
? windowTracker.getWindow(createProperties.windowId, context)
@@ -695,7 +695,7 @@ this.tabs = class extends ExtensionAPIPersistent {
}
let { gBrowserInit } = window;
if (!gBrowserInit || !gBrowserInit.delayedStartupFinished) {
- let obs = (finishedWindow, topic, data) => {
+ let obs = finishedWindow => {
if (finishedWindow != window) {
return;
}
@@ -1364,7 +1364,11 @@ this.tabs = class extends ExtensionAPIPersistent {
}
filename = DownloadPaths.sanitize(filename);
- picker.init(activeTab.ownerGlobal, title, Ci.nsIFilePicker.modeSave);
+ picker.init(
+ activeTab.ownerGlobal.browsingContext,
+ title,
+ Ci.nsIFilePicker.modeSave
+ );
picker.appendFilter("PDF", "*.pdf");
picker.defaultExtension = "pdf";
picker.defaultString = filename;
diff --git a/browser/components/extensions/parent/ext-topSites.js b/browser/components/extensions/parent/ext-topSites.js
index 1400a7c236..6ef6a49287 100644
--- a/browser/components/extensions/parent/ext-topSites.js
+++ b/browser/components/extensions/parent/ext-topSites.js
@@ -19,7 +19,7 @@ const TOPSITES_FEED_PREF =
"browser.newtabpage.activity-stream.feeds.system.topsites";
this.topSites = class extends ExtensionAPI {
- getAPI(context) {
+ getAPI() {
return {
topSites: {
get: async function (options) {
diff --git a/browser/components/extensions/parent/ext-url-overrides.js b/browser/components/extensions/parent/ext-url-overrides.js
index cff36a8762..5be610a637 100644
--- a/browser/components/extensions/parent/ext-url-overrides.js
+++ b/browser/components/extensions/parent/ext-url-overrides.js
@@ -150,7 +150,7 @@ this.urlOverrides = class extends ExtensionAPI {
}
}
- async onManifestEntry(entryName) {
+ async onManifestEntry() {
let { extension } = this;
let { manifest } = extension;
diff --git a/browser/components/extensions/parent/ext-windows.js b/browser/components/extensions/parent/ext-windows.js
index 3691ecdf56..cd715c0a3e 100644
--- a/browser/components/extensions/parent/ext-windows.js
+++ b/browser/components/extensions/parent/ext-windows.js
@@ -112,7 +112,7 @@ this.windows = class extends ExtensionAPIPersistent {
// Keep track of the last windowId used to fire an onFocusChanged event
let lastOnFocusChangedWindowId;
- let listener = event => {
+ let listener = () => {
// Wait a tick to avoid firing a superfluous WINDOW_ID_NONE
// event when switching focus between two Firefox windows.
Promise.resolve().then(() => {