Bug 1311420 - Add a notice to the addon manager and about:plugins about NPAPI deprecation, r?felipe
MozReview-Commit-ID: HuHbCASJiux
--- a/dom/locales/en-US/chrome/plugins.properties
+++ b/dom/locales/en-US/chrome/plugins.properties
@@ -16,16 +16,19 @@ version_label=Version:
state_label=State:
state_enabled=Enabled
state_disabled=Disabled
mimetype_label=MIME Type
description_label=Description
suffixes_label=Suffixes
learn_more_label=Learn More
+deprecation_description=Missing something? Some plugins are no longer supported.
+deprecation_learn_more=Learn More.
+
# GMP Plugins
gmp_license_info=License information
gmp_privacy_info=Privacy Information
openH264_name=OpenH264 Video Codec provided by Cisco Systems, Inc.
openH264_description2=This plugin is automatically installed by Mozilla to comply with the WebRTC specification and to enable WebRTC calls with devices that require the H.264 video codec. Visit http://www.openh264.org/ to view the codec source code and learn more about the implementation.
eme-adobe_name=Primetime Content Decryption Module provided by Adobe Systems, Incorporated
--- a/toolkit/content/plugins.css
+++ b/toolkit/content/plugins.css
@@ -75,8 +75,14 @@ td {
th.type, th.suff {
width: 25%;
}
th.desc {
width: 50%;
}
+
+.notice {
+ background: -moz-cellhighlight;
+ border: 1px solid ThreeDShadow;
+ padding: 10px;
+}
--- a/toolkit/content/plugins.html
+++ b/toolkit/content/plugins.html
@@ -4,16 +4,18 @@
- 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/. -->
<html>
<head>
<script type="application/javascript">
"use strict";
+ Components.utils.import("resource://gre/modules/Services.jsm");
+
var Ci = Components.interfaces;
var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
var pluginsbundle = strBundleService.createBundle("chrome://global/locale/plugins.properties");
document.writeln("<title>" + pluginsbundle.GetStringFromName("title_label") + "<\/title>");
</script>
<link rel="stylesheet" type="text/css" href="chrome://global/content/plugins.css">
<link rel="stylesheet" type="text/css" href="chrome://global/skin/plugins.css">
@@ -67,16 +69,25 @@
id = "noplugs";
label = "nopluginsareinstalled_label";
}
var enabledplugins = document.createElement("h1");
enabledplugins.setAttribute("id", id);
enabledplugins.appendChild(document.createTextNode(pluginsbundle.GetStringFromName(label)));
fragment.appendChild(enabledplugins);
+ var deprecation = document.createElement("p");
+ deprecation.setAttribute("class", "notice");
+ deprecation.textContent = pluginsbundle.GetStringFromName("deprecation_description") + " ";
+ var deprecationLink = document.createElement("a");
+ deprecationLink.textContent = pluginsbundle.GetStringFromName("deprecation_learn_more");
+ deprecationLink.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "npapi";
+ deprecation.appendChild(deprecationLink);
+ fragment.appendChild(deprecation);
+
var stateNames = {};
["STATE_SOFTBLOCKED",
"STATE_BLOCKED",
"STATE_OUTDATED",
"STATE_VULNERABLE_UPDATE_AVAILABLE",
"STATE_VULNERABLE_NO_UPDATE"].forEach(function(label) {
stateNames[Ci.nsIBlocklistService[label]] = label;
});
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
@@ -241,8 +241,11 @@
<!ENTITY disabledUnsigned.description.end " or ask the developer to get them verified.">
<!ENTITY disabledUnsigned.learnMore "Learn more about our efforts to help keep you safe online.">
<!-- LOCALIZATION NOTE (disabledUnsigned.devInfo.start, disabledUnsigned.devInfo.linkToManual, disabledUnsigned.devInfo.end):
These entities form a sentence, with disabledUnsigned.devInfo.linkToManual
being a link to an external site. -->
<!ENTITY disabledUnsigned.devInfo.start "Developers interested in getting their add-ons verified can continue by reading our ">
<!ENTITY disabledUnsigned.devInfo.linkToManual "manual">
<!ENTITY disabledUnsigned.devInfo.end ".">
+
+<!ENTITY pluginDeprecation.description "Missing something? Some plugins are no longer supported by &brandShortName;.">
+<!ENTITY pluginDeprecation.learnMore "Learn More.">
--- a/toolkit/mozapps/extensions/content/extensions.css
+++ b/toolkit/mozapps/extensions/content/extensions.css
@@ -193,16 +193,20 @@ setting[type="menulist"] {
/* Plugins aren't yet disabled by safemode (bug 342333),
so don't show that warning when viewing plugins. */
#addons-page[warning="safemode"] .view-pane[type="plugin"] .global-warning-container,
#addons-page[warning="safemode"] #detail-view[loading="true"] .global-warning {
display: none;
}
+#addons-page .view-pane:not([type="plugin"]) #plugindeprecation-notice {
+ display: none;
+}
+
#addons-page .view-pane:not([type="experiment"]) .experiment-info-container {
display: none;
}
.addon .relnotes {
-moz-user-select: text;
}
#detail-name, #detail-desc, #detail-fulldesc {
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -2752,16 +2752,23 @@ var gListView = {
}
try {
document.getElementById("signing-dev-manual-link").setAttribute("href",
Services.prefs.getCharPref("xpinstall.signatures.devInfoURL"));
} catch (e) {
document.getElementById("signing-dev-info").hidden = true;
}
+
+ if (Preferences.get("plugin.load_flash_only", true)) {
+ document.getElementById("plugindeprecation-learnmore-link")
+ .setAttribute("href", Services.urlFormatter.formatURLPref("app.support.baseURL") + "npapi");
+ } else {
+ document.getElementById("plugindeprecation-notice").hidden = true;
+ }
},
show: function(aType, aRequest) {
let showOnlyDisabledUnsigned = false;
if (aType.endsWith("?unsigned=true")) {
aType = aType.replace(/\?.*/, "");
showOnlyDisabledUnsigned = true;
}
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -348,16 +348,23 @@
<description>
&disabledUnsigned.description.start;<label class="text-link plain" id="find-alternative-addons">&disabledUnsigned.description.findAddonsLink;</label>&disabledUnsigned.description.end;
</description>
<hbox pack="start"><label class="text-link" id="signing-learn-more">&disabledUnsigned.learnMore;</label></hbox>
<description id="signing-dev-info">
&disabledUnsigned.devInfo.start;<label class="text-link plain" id="signing-dev-manual-link">&disabledUnsigned.devInfo.linkToManual;</label>&disabledUnsigned.devInfo.end;
</description>
</vbox>
+ <vbox id="plugindeprecation-notice" class="alert-container">
+ <hbox class="alert">
+ <description>&pluginDeprecation.description;
+ <label class="text-link plain" id="plugindeprecation-learnmore-link">&pluginDeprecation.learnMore;</label>
+ </description>
+ </hbox>
+ </vbox>
<hbox class="view-header global-warning-container">
<!-- global warnings -->
<hbox class="global-warning" flex="1">
<hbox class="global-warning-safemode" flex="1" align="center"
tooltiptext="&warning.safemode.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.safemode.label;"/>