summaryrefslogtreecommitdiffstats
path: root/mobile/android/components
diff options
context:
space:
mode:
Diffstat (limited to 'mobile/android/components')
-rw-r--r--mobile/android/components/extensions/ext-android.js2
-rw-r--r--mobile/android/components/extensions/ext-browserAction.js4
-rw-r--r--mobile/android/components/extensions/ext-downloads.js20
-rw-r--r--mobile/android/components/extensions/ext-pageAction.js4
-rw-r--r--mobile/android/components/extensions/ext-tabs.js15
-rw-r--r--mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html4
-rw-r--r--mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html12
-rw-r--r--mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html2
-rw-r--r--mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html6
-rw-r--r--mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js2
-rw-r--r--mobile/android/components/geckoview/FilePickerDelegate.sys.mjs4
-rw-r--r--mobile/android/components/geckoview/GeckoViewPrompter.sys.mjs2
-rw-r--r--mobile/android/components/geckoview/GeckoViewPush.sys.mjs9
-rw-r--r--mobile/android/components/geckoview/GeckoViewStartup.sys.mjs4
-rw-r--r--mobile/android/components/geckoview/LoginStorageDelegate.sys.mjs9
15 files changed, 46 insertions, 53 deletions
diff --git a/mobile/android/components/extensions/ext-android.js b/mobile/android/components/extensions/ext-android.js
index b53c390f36..2576a42ba5 100644
--- a/mobile/android/components/extensions/ext-android.js
+++ b/mobile/android/components/extensions/ext-android.js
@@ -197,7 +197,7 @@ global.makeGlobalEvent = function makeGlobalEvent(
name,
register: fire => {
const listener2 = {
- onEvent(event, data, callback) {
+ onEvent(event, data) {
listener(fire, data);
},
};
diff --git a/mobile/android/components/extensions/ext-browserAction.js b/mobile/android/components/extensions/ext-browserAction.js
index 3a91e913f9..de693274d6 100644
--- a/mobile/android/components/extensions/ext-browserAction.js
+++ b/mobile/android/components/extensions/ext-browserAction.js
@@ -28,7 +28,7 @@ const BROWSER_ACTION_PROPERTIES = [
class BrowserAction extends BrowserActionBase {
constructor(extension, clickDelegate) {
- const tabContext = new TabContext(tabId => this.getContextData(null));
+ const tabContext = new TabContext(() => this.getContextData(null));
super(tabContext, extension);
this.clickDelegate = clickDelegate;
this.helper = new ExtensionActionHelper({
@@ -86,7 +86,7 @@ this.browserAction = class extends ExtensionAPIPersistent {
return GeckoViewWebExtension.browserActions.get(extension);
}
- async onManifestEntry(entryName) {
+ async onManifestEntry() {
const { extension } = this;
this.action = new BrowserAction(extension, this);
await this.action.loadIconData();
diff --git a/mobile/android/components/extensions/ext-downloads.js b/mobile/android/components/extensions/ext-downloads.js
index 6422440d54..1dd5b558e1 100644
--- a/mobile/android/components/extensions/ext-downloads.js
+++ b/mobile/android/components/extensions/ext-downloads.js
@@ -146,7 +146,7 @@ class DownloadItem {
this.downloads = class extends ExtensionAPIPersistent {
PERSISTENT_EVENTS = {
- onChanged({ fire }, params) {
+ onChanged({ fire }) {
const listener = (eventName, event) => {
const { delta, downloadItem } = event;
const { extension } = this;
@@ -248,23 +248,23 @@ this.downloads = class extends ExtensionAPIPersistent {
});
},
- removeFile(downloadId) {
+ removeFile() {
throw new ExtensionError("Not implemented");
},
- search(query) {
+ search() {
throw new ExtensionError("Not implemented");
},
- pause(downloadId) {
+ pause() {
throw new ExtensionError("Not implemented");
},
- resume(downloadId) {
+ resume() {
throw new ExtensionError("Not implemented");
},
- cancel(downloadId) {
+ cancel() {
throw new ExtensionError("Not implemented");
},
@@ -272,19 +272,19 @@ this.downloads = class extends ExtensionAPIPersistent {
throw new ExtensionError("Not implemented");
},
- erase(query) {
+ erase() {
throw new ExtensionError("Not implemented");
},
- open(downloadId) {
+ open() {
throw new ExtensionError("Not implemented");
},
- show(downloadId) {
+ show() {
throw new ExtensionError("Not implemented");
},
- getFileIcon(downloadId, options) {
+ getFileIcon() {
throw new ExtensionError("Not implemented");
},
diff --git a/mobile/android/components/extensions/ext-pageAction.js b/mobile/android/components/extensions/ext-pageAction.js
index 04973379f1..18eeb241b1 100644
--- a/mobile/android/components/extensions/ext-pageAction.js
+++ b/mobile/android/components/extensions/ext-pageAction.js
@@ -26,7 +26,7 @@ const PAGE_ACTION_PROPERTIES = [
class PageAction extends PageActionBase {
constructor(extension, clickDelegate) {
- const tabContext = new TabContext(tabId => this.getContextData(null));
+ const tabContext = new TabContext(() => this.getContextData(null));
super(tabContext, extension);
this.clickDelegate = clickDelegate;
this.helper = new ExtensionActionHelper({
@@ -80,7 +80,7 @@ this.pageAction = class extends ExtensionAPIPersistent {
return GeckoViewWebExtension.pageActions.get(extension);
}
- async onManifestEntry(entryName) {
+ async onManifestEntry() {
const { extension } = this;
const action = new PageAction(extension, this);
await action.loadIconData();
diff --git a/mobile/android/components/extensions/ext-tabs.js b/mobile/android/components/extensions/ext-tabs.js
index 88d3d9e83a..66c7417379 100644
--- a/mobile/android/components/extensions/ext-tabs.js
+++ b/mobile/android/components/extensions/ext-tabs.js
@@ -28,7 +28,7 @@ const tabListener = {
}
},
- onLocationChange(browser, webProgress, request, locationURI, flags) {
+ onLocationChange(browser, webProgress, request) {
if (webProgress.isTopLevel) {
const { tab } = browser.ownerGlobal;
@@ -103,7 +103,7 @@ this.tabs = class extends ExtensionAPIPersistent {
}
PERSISTENT_EVENTS = {
- onActivated({ fire, context }, params) {
+ onActivated({ fire, context }) {
const listener = (eventName, event) => {
const { windowId, tabId, isPrivate } = event;
if (isPrivate && !context.privateBrowsingAllowed) {
@@ -140,7 +140,7 @@ this.tabs = class extends ExtensionAPIPersistent {
});
},
}),
- onUpdated({ fire }, params) {
+ onUpdated({ fire }) {
const { tabManager } = this.extension;
const restricted = ["url", "favIconUrl", "title"];
@@ -328,7 +328,7 @@ this.tabs = class extends ExtensionAPIPersistent {
onAttached: new EventManager({
context,
name: "tabs.onAttached",
- register: fire => {
+ register: () => {
return () => {};
},
}).api(),
@@ -336,7 +336,7 @@ this.tabs = class extends ExtensionAPIPersistent {
onDetached: new EventManager({
context,
name: "tabs.onDetached",
- register: fire => {
+ register: () => {
return () => {};
},
}).api(),
@@ -351,7 +351,7 @@ this.tabs = class extends ExtensionAPIPersistent {
onReplaced: new EventManager({
context,
name: "tabs.onReplaced",
- register: fire => {
+ register: () => {
return () => {};
},
}).api(),
@@ -359,7 +359,7 @@ this.tabs = class extends ExtensionAPIPersistent {
onMoved: new EventManager({
context,
name: "tabs.onMoved",
- register: fire => {
+ register: () => {
return () => {};
},
}).api(),
@@ -378,7 +378,6 @@ this.tabs = class extends ExtensionAPIPersistent {
index,
openInReaderMode,
pinned,
- title,
url,
} = {}) {
if (active === null) {
diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html
index cd708d942a..19aaf07f92 100644
--- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html
@@ -106,7 +106,7 @@ add_task(async function testTabRemovalEvent() {
async function background() {
function awaitLoad(tabId) {
return new Promise(resolve => {
- browser.tabs.onUpdated.addListener(function listener(tabId_, changed, tab) {
+ browser.tabs.onUpdated.addListener(function listener(tabId_, changed) {
if (tabId == tabId_ && changed.status == "complete") {
browser.tabs.onUpdated.removeListener(listener);
resolve();
@@ -115,7 +115,7 @@ add_task(async function testTabRemovalEvent() {
});
}
- chrome.tabs.onRemoved.addListener((tabId, info) => {
+ chrome.tabs.onRemoved.addListener((tabId) => {
browser.test.log("Make sure the removed tab is not available in the tabs.query callback.");
chrome.tabs.query({}, tabs => {
for (const tab of tabs) {
diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html
index 09e42d73cf..ab722f48d7 100644
--- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html
@@ -40,7 +40,7 @@ add_task(async function testExecuteScript() {
browser.tabs.executeScript({
file: "script.js",
code: "42",
- }).then(result => {
+ }).then(() => {
browser.test.fail("Expected not to be able to execute a script with both file and code");
}, error => {
browser.test.assertTrue(/a 'code' or a 'file' property, but not both/.test(error.message),
@@ -99,7 +99,7 @@ add_task(async function testExecuteScript() {
browser.tabs.executeScript({
code: "window",
- }).then(result => {
+ }).then(() => {
browser.test.fail("Expected error when returning non-structured-clonable object");
}, error => {
browser.test.assertEq("<anonymous code>", error.fileName, "Got expected fileName");
@@ -109,7 +109,7 @@ add_task(async function testExecuteScript() {
browser.tabs.executeScript({
code: "Promise.resolve(window)",
- }).then(result => {
+ }).then(() => {
browser.test.fail("Expected error when returning non-structured-clonable object");
}, error => {
browser.test.assertEq("<anonymous code>", error.fileName, "Got expected fileName");
@@ -119,7 +119,7 @@ add_task(async function testExecuteScript() {
browser.tabs.executeScript({
file: "script3.js",
- }).then(result => {
+ }).then(() => {
browser.test.fail("Expected error when returning non-structured-clonable object");
}, error => {
const expected = /Script '.*script3.js' result is non-structured-clonable data/;
@@ -130,7 +130,7 @@ add_task(async function testExecuteScript() {
browser.tabs.executeScript({
frameId: Number.MAX_SAFE_INTEGER,
code: "42",
- }).then(result => {
+ }).then(() => {
browser.test.fail("Expected error when specifying invalid frame ID");
}, error => {
browser.test.assertEq(
@@ -143,7 +143,7 @@ add_task(async function testExecuteScript() {
browser.tabs.create({url: "http://example.net/", active: false}).then(async tab => {
await browser.tabs.executeScript(tab.id, {
code: "42",
- }).then(result => {
+ }).then(() => {
browser.test.fail("Expected error when trying to execute on invalid domain");
}, error => {
browser.test.assertEq(`Missing host permission for the tab`,
diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html
index 8d96e79cc2..1ec815c8c7 100644
--- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html
@@ -44,7 +44,7 @@ add_task(async function test_onUpdated() {
}
});
- browser.runtime.onMessage.addListener(async msg => {
+ browser.runtime.onMessage.addListener(async () => {
if (collectedSequence.length !== expectedSequence.length) {
browser.test.assertEq(
JSON.stringify(expectedSequence),
diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html
index 320ce4dde6..4709fbe31c 100644
--- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html
@@ -31,7 +31,7 @@ add_task(async function tabsSendMessageReply() {
// eslint-disable-next-line prefer-const
let firstTab;
const promiseResponse = new Promise(resolve => {
- browser.runtime.onMessage.addListener((msg, sender, respond) => {
+ browser.runtime.onMessage.addListener((msg, sender) => {
if (msg == "content-script-ready") {
const tabId = sender.tab.id;
@@ -170,7 +170,7 @@ add_task(async function tabsSendHidden() {
background: async function() {
let resolveContent;
- browser.runtime.onMessage.addListener((msg, sender) => {
+ browser.runtime.onMessage.addListener((msg) => {
if (msg[0] == "content-ready") {
resolveContent(msg[1]);
}
@@ -220,7 +220,7 @@ add_task(async function tabsSendHidden() {
// properties of the possibly-hidden content window.
const href = window.location.href;
- browser.runtime.onMessage.addListener((msg, sender) => {
+ browser.runtime.onMessage.addListener((msg) => {
browser.test.assertEq(href, msg, "Should be in the expected content window");
return Promise.resolve(href);
diff --git a/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js b/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js
index 3ba2e26139..43bc138e7f 100644
--- a/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js
+++ b/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js
@@ -34,7 +34,7 @@ class EmbedderPort {
onPortDisconnect() {
Assert.ok(false, "onPortDisconnect not expected to be called");
}
- onPortMessage(holder) {
+ onPortMessage() {
Assert.ok(false, "onPortMessage not expected to be called");
}
triggerPortDisconnect() {
diff --git a/mobile/android/components/geckoview/FilePickerDelegate.sys.mjs b/mobile/android/components/geckoview/FilePickerDelegate.sys.mjs
index 3972017b40..52d1b93233 100644
--- a/mobile/android/components/geckoview/FilePickerDelegate.sys.mjs
+++ b/mobile/android/components/geckoview/FilePickerDelegate.sys.mjs
@@ -15,14 +15,14 @@ const { debug, warn } = GeckoViewUtils.initLogging("FilePickerDelegate");
export class FilePickerDelegate {
/* ---------- nsIFilePicker ---------- */
- init(aParent, aTitle, aMode) {
+ init(aBrowsingContext, aTitle, aMode) {
if (
aMode === Ci.nsIFilePicker.modeGetFolder ||
aMode === Ci.nsIFilePicker.modeSave
) {
throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
}
- this._prompt = new lazy.GeckoViewPrompter(aParent);
+ this._prompt = new lazy.GeckoViewPrompter(aBrowsingContext);
this._msg = {
type: "file",
title: aTitle,
diff --git a/mobile/android/components/geckoview/GeckoViewPrompter.sys.mjs b/mobile/android/components/geckoview/GeckoViewPrompter.sys.mjs
index f81c155678..5c4b91c2de 100644
--- a/mobile/android/components/geckoview/GeckoViewPrompter.sys.mjs
+++ b/mobile/android/components/geckoview/GeckoViewPrompter.sys.mjs
@@ -140,7 +140,7 @@ export class GeckoViewPrompter {
// Spin this thread while we wait for a result
Services.tm.spinEventLoopUntil(
- "GeckoViewPrompter.jsm:showPrompt",
+ "GeckoViewPrompter.sys.mjs:showPrompt",
() => this._domWin.closed || result !== undefined
);
} finally {
diff --git a/mobile/android/components/geckoview/GeckoViewPush.sys.mjs b/mobile/android/components/geckoview/GeckoViewPush.sys.mjs
index d6625942e8..ee315b850f 100644
--- a/mobile/android/components/geckoview/GeckoViewPush.sys.mjs
+++ b/mobile/android/components/geckoview/GeckoViewPush.sys.mjs
@@ -22,7 +22,6 @@ const OBSERVER_TOPIC_SUBSCRIPTION_MODIFIED = "push-subscription-modified";
function createSubscription({
scope,
- principal,
browserPublicKey,
authSecret,
endpoint,
@@ -59,7 +58,7 @@ export class PushService {
// nsIObserver methods
- observe(subject, topic, data) {}
+ observe() {}
// nsIPushService methods
@@ -151,13 +150,13 @@ export class PushService {
// nsIPushQuotaManager methods
- notificationForOriginShown(origin) {}
+ notificationForOriginShown() {}
- notificationForOriginClosed(origin) {}
+ notificationForOriginClosed() {}
// nsIPushErrorReporter methods
- reportDeliveryError(messageId, reason) {}
+ reportDeliveryError() {}
}
PushService.prototype.classID = Components.ID(
diff --git a/mobile/android/components/geckoview/GeckoViewStartup.sys.mjs b/mobile/android/components/geckoview/GeckoViewStartup.sys.mjs
index 734db47887..2a5b0beb4d 100644
--- a/mobile/android/components/geckoview/GeckoViewStartup.sys.mjs
+++ b/mobile/android/components/geckoview/GeckoViewStartup.sys.mjs
@@ -95,7 +95,7 @@ const JSWINDOWACTORS = {
export class GeckoViewStartup {
/* ---------- nsIObserver ---------- */
- observe(aSubject, aTopic, aData) {
+ observe(aSubject, aTopic) {
debug`observe: ${aTopic}`;
switch (aTopic) {
case "content-process-ready-for-script":
@@ -284,7 +284,7 @@ export class GeckoViewStartup {
}
}
- onEvent(aEvent, aData, aCallback) {
+ onEvent(aEvent, aData) {
debug`onEvent ${aEvent}`;
switch (aEvent) {
diff --git a/mobile/android/components/geckoview/LoginStorageDelegate.sys.mjs b/mobile/android/components/geckoview/LoginStorageDelegate.sys.mjs
index 28916917ca..3c6d264069 100644
--- a/mobile/android/components/geckoview/LoginStorageDelegate.sys.mjs
+++ b/mobile/android/components/geckoview/LoginStorageDelegate.sys.mjs
@@ -38,12 +38,7 @@ export class LoginStorageDelegate {
};
}
- promptToSavePassword(
- aBrowser,
- aLogin,
- dismissed = false,
- notifySaved = false
- ) {
+ promptToSavePassword(aBrowser, aLogin, dismissed = false) {
const prompt = new lazy.GeckoViewPrompter(aBrowser.ownerGlobal);
prompt.asyncShowPrompt(
this._createMessage({ dismissed }, [
@@ -75,7 +70,7 @@ export class LoginStorageDelegate {
aOldLogin,
aNewLogin,
dismissed = false,
- notifySaved = false,
+ notifySaved,
autoSavedLoginGuid = ""
) {
const newLogin = lazy.LoginEntry.fromLoginInfo(aOldLogin || aNewLogin);