зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1777906 - update quitter xpi to be signed from mozilla-extensions repo. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D156702
This commit is contained in:
Родитель
32188211aa
Коммит
c67d212559
|
@ -161,7 +161,6 @@ if CONFIG['MOZ_GECKODRIVER'] and not CONFIG['MOZ_TSAN'] and not CONFIG['FUZZING_
|
|||
DIRS += ['/testing/geckodriver']
|
||||
|
||||
DIRS += [
|
||||
'/tools/quitter',
|
||||
'/media/gmp-clearkey/0.1',
|
||||
]
|
||||
|
||||
|
|
|
@ -1,11 +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";
|
||||
|
||||
module.exports = {
|
||||
globals: {
|
||||
cloneInto: true,
|
||||
},
|
||||
};
|
|
@ -1,6 +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/.
|
||||
|
||||
XPI_PKGNAME = quitter@mozilla.org
|
|
@ -0,0 +1,6 @@
|
|||
All code for this is part of the quitter project on github:
|
||||
https://github.com/mozilla-extensions/quitter
|
||||
|
||||
This is within the mozilla-extensions organization so that we can sign the .xpi.
|
||||
|
||||
To update code, please submit a PR to the github repo. Once that is merged in, a JIRA ticket (ex [ADDONSOPS-194](https://mozilla-hub.atlassian.net/browse/ADDONSOPS-194)) is needed to resign the .xpi.
|
|
@ -1,13 +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";
|
||||
|
||||
/* eslint-env webextensions */
|
||||
|
||||
browser.runtime.onMessage.addListener(msg => {
|
||||
if (msg === "quit") {
|
||||
browser.quitter.quit();
|
||||
}
|
||||
});
|
|
@ -1,21 +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";
|
||||
|
||||
/* eslint-env webextensions */
|
||||
|
||||
const Quitter = {
|
||||
async quit() {
|
||||
// This can be called before the background page has loaded,
|
||||
// so we need to wait for it.
|
||||
browser.runtime.sendMessage("quit").catch(() => {
|
||||
setTimeout(Quitter.quit, 100);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
window.wrappedJSObject.Quitter = cloneInto(Quitter, window, {
|
||||
cloneFunctions: true,
|
||||
});
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
|
||||
"applications": {
|
||||
"gecko": {"id": "quitter@mozilla.org"}
|
||||
},
|
||||
|
||||
"name": "Quitter",
|
||||
"description": "Quit",
|
||||
"version": "2019.12.03",
|
||||
"author": "Mozilla",
|
||||
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
},
|
||||
|
||||
"content_scripts": [{
|
||||
"js": ["contentscript.js"],
|
||||
"run_at": "document_start",
|
||||
"match_about_blank": true,
|
||||
"matches": ["<all_urls>"]
|
||||
}],
|
||||
|
||||
"experiment_apis": {
|
||||
"quitter": {
|
||||
"schema": "schema.json",
|
||||
"parent": {
|
||||
"scopes": ["addon_parent"],
|
||||
"script": "parent.js",
|
||||
"paths": [["quitter", "quit"]]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
XPI_NAME = "quitter"
|
||||
|
||||
USE_EXTENSION_MANIFEST = True
|
||||
|
||||
FINAL_TARGET_FILES += [
|
||||
"background.js",
|
||||
"contentscript.js",
|
||||
"manifest.json",
|
||||
"parent.js",
|
||||
"schema.json",
|
||||
]
|
|
@ -1,25 +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";
|
||||
|
||||
/* globals ExtensionAPI, Services */
|
||||
|
||||
this.quitter = class extends ExtensionAPI {
|
||||
getAPI(context) {
|
||||
return {
|
||||
quitter: {
|
||||
async quit() {
|
||||
let browserWindow = Services.wm.getMostRecentWindow(
|
||||
"navigator:browser"
|
||||
);
|
||||
if (browserWindow && browserWindow.gBrowserInit) {
|
||||
await browserWindow.gBrowserInit.idleTasksFinishedPromise;
|
||||
}
|
||||
Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
Двоичные данные
tools/quitter/quitter@mozilla.org.xpi
Двоичные данные
tools/quitter/quitter@mozilla.org.xpi
Двоичный файл не отображается.
|
@ -1,13 +0,0 @@
|
|||
[
|
||||
{
|
||||
"namespace": "quitter",
|
||||
"functions": [
|
||||
{
|
||||
"name": "quit",
|
||||
"type": "function",
|
||||
"async": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Загрузка…
Ссылка в новой задаче