summaryrefslogtreecommitdiffstats
path: root/mobile/android/components/XPIDialogService.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-23 15:32:23 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-23 15:32:23 -0400
commitabe80cc31d5a40ebed743085011fbcda0c1a9a10 (patch)
treefb3762f06b84745b182af281abb107b95a9fcf01 /mobile/android/components/XPIDialogService.js
parent63295d0087eb58a6eb34cad324c4c53d1b220491 (diff)
downloadUXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.gz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.lz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.xz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.zip
Issue #1053 - Drop support Android and remove Fennec - Part 1a: Remove mobile/android
Diffstat (limited to 'mobile/android/components/XPIDialogService.js')
-rw-r--r--mobile/android/components/XPIDialogService.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/mobile/android/components/XPIDialogService.js b/mobile/android/components/XPIDialogService.js
deleted file mode 100644
index 2a33d4ddf..000000000
--- a/mobile/android/components/XPIDialogService.js
+++ /dev/null
@@ -1,49 +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/. */
-
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm");
-
-// -----------------------------------------------------------------------
-// Web Install Prompt service
-// -----------------------------------------------------------------------
-
-function WebInstallPrompt() { }
-
-WebInstallPrompt.prototype = {
- classID: Components.ID("{c1242012-27d8-477e-a0f1-0b098ffc329b}"),
- QueryInterface: XPCOMUtils.generateQI([Ci.amIWebInstallPrompt]),
-
- confirm: function(aBrowser, aURL, aInstalls) {
- let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-
- let prompt = Services.prompt;
- let flags = prompt.BUTTON_POS_0 * prompt.BUTTON_TITLE_IS_STRING + prompt.BUTTON_POS_1 * prompt.BUTTON_TITLE_CANCEL;
- let title = bundle.GetStringFromName("addonsConfirmInstall.title");
- let button = bundle.GetStringFromName("addonsConfirmInstall.install");
-
- aInstalls.forEach(function(install) {
- let message;
- if (install.addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) {
- title = bundle.GetStringFromName("addonsConfirmInstallUnsigned.title")
- message = bundle.GetStringFromName("addonsConfirmInstallUnsigned.message") + "\n\n" + install.name;
- } else {
- message = install.name;
- }
-
- let result = (prompt.confirmEx(aBrowser.contentWindow, title, message, flags, button, null, null, null, {value: false}) == 0);
- if (result)
- install.install();
- else
- install.cancel();
- });
- }
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([WebInstallPrompt]);