Bug 1321947 - Add "Don't Allow" button to add-on installation permission doorhanger to make it dismissible. r=florian

MozReview-Commit-ID: FwRmLOMA1Zr

--HG--
extra : rebase_source : 761363ce4eb203fde9e30a2f4ee60ccbdb3da14f
This commit is contained in:
Sebastian Hengst 2016-12-04 18:29:14 +01:00
Родитель a9316f59e5
Коммит fb87db0768
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -281,11 +281,16 @@ const gXPInstallObserver = {
installInfo.install();
}
};
let secondaryAction = {
label: gNavigatorBundle.getString("xpinstallPromptMessage.dontAllow"),
accessKey: gNavigatorBundle.getString("xpinstallPromptMessage.dontAllow.accesskey"),
callback: () => {},
};
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED);
let popup = PopupNotifications.show(browser, notificationID,
messageString, anchorID,
action, null, options);
action, [secondaryAction], options);
removeNotificationOnEnd(popup, installInfo.installs);
break; }
case "addon-install-started": {

Просмотреть файл

@ -21,6 +21,8 @@ contextMenuSearch.accesskey=S
bookmarkAllTabsDefault=[Folder Name]
xpinstallPromptMessage=%S prevented this site from asking you to install software on your computer.
xpinstallPromptMessage.dontAllow=Dont Allow
xpinstallPromptMessage.dontAllow.accesskey=D
xpinstallPromptAllowButton=Allow
# Accessibility Note:
# Be sure you do not choose an accesskey that is used elsewhere in the active context (e.g. main menu bar, submenu of the warning popup button)