Closed Bug 922107 Opened 12 years ago Closed 11 years ago

Add pref to hide the "missing plugin" notifications

Categories

(Core Graveyard :: Plug-ins, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: gfritzsche, Assigned: beberveiga)

Details

(Whiteboard: [mentor=gfritzsche][lang=JS][good first bug])

Attachments

(2 files, 1 obsolete file)

Per bug 917713 there are relevant use-cases for hiding all missing-plugin notifications. Adding, say, plugins.hideMissingPluginsNotification is rather easy and we supported something similar previously (plugins.hide_infobar_for_missing_plugin). Any objections?
To reproduce this: * don't have Java, Flash or Quicktime installed * navigate to a page that use the plugin (e.g. [1], [2]) * notice the doorhanger popping up asking you to install To implement this, it should be enough to return false from showInstallNotification() [3] if the preference is set. See e.g. [4] for how to check a bool preference. [1] http://benjamin.smedbergs.us/tests/ctptests/flash-solo.html [2] http://benjamin.smedbergs.us/tests/ctptests/java-solo.html [3] http://hg.mozilla.org/mozilla-central/annotate/2bddbd180d2d/browser/base/content/browser-plugins.js#l506 [4] http://hg.mozilla.org/mozilla-central/annotate/2bddbd180d2d/browser/base/content/browser-plugins.js#l545
Whiteboard: [mentor=gfritzsche][lang=JS][good first bug]
Assignee: georg.fritzsche → nobody
Attachment #8380240 - Flags: review?(georg.fritzsche)
Assignee: nobody → contact
Comment on attachment 8380240 [details] [diff] [review] 922107-add-pref-to-hide-the-missing-plugin-notifications.patch Review of attachment 8380240 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch, this looks good in my local testing! Note that the commit message doesn't need a '#' in front of the bug number, just "Bug 922107" is enough. ::: browser/base/content/browser-plugins.js @@ +504,5 @@ > openHelpLink("plugin-crashed", false); > }, > > showInstallNotification: function (aPlugin) { > + let hideMissingPluginsNotification = Services.prefs.getBoolPref(this.PREF_HIDE_MISSING_PLUGINS_NOTIFICATION); You could add a linebreak after the '=' and indent to stay under 80 character linelength here. Also, i don't think the empty line before the if-statement is needed.
Attachment #8380240 - Flags: review?(jaws)
Attachment #8380240 - Flags: review?(georg.fritzsche)
Attachment #8380240 - Flags: feedback+
Attachment #8380567 - Flags: review?(jaws)
Status: NEW → ASSIGNED
Comment on attachment 8380240 [details] [diff] [review] 922107-add-pref-to-hide-the-missing-plugin-notifications.patch Review of attachment 8380240 [details] [diff] [review]: ----------------------------------------------------------------- I don't know how I feel about adding new hidden prefs, but this is pretty simple.
Attachment #8380240 - Flags: review?(jaws) → review+
Comment on attachment 8380567 [details] [diff] [review] Add test for the pref Review of attachment 8380567 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for adding a test for this.
Attachment #8380567 - Flags: review?(jaws) → review+
Attachment #8380240 - Attachment is obsolete: true
Attachment #8380987 - Flags: review?(georg.fritzsche)
(In reply to Georg Fritzsche [:gfritzsche] from comment #1) > To reproduce this: > * don't have Java, Flash or Quicktime installed > * navigate to a page that use the plugin (e.g. [1], [2]) > * notice the doorhanger popping up asking you to install Nit: that's not quite correct. We only show the doorhanger for Flash (unless plugins.notifyMissingFlash has been disabled, by the UI available in that doorhanger). Other plugin types only get an icon added to the URL bar -- no notification is shown unless you click it.
(In reply to Justin Dolske [:Dolske] from comment #8) > Nit: that's not quite correct. We only show the doorhanger for Flash (unless > plugins.notifyMissingFlash has been disabled, by the UI available in that > doorhanger). Other plugin types only get an icon added to the URL bar -- no > notification is shown unless you click it. Ah, indeed. The patch here disables the notification icon (and stops Flash popups as well).
Comment on attachment 8380987 [details] [diff] [review] 922107-add-pref-to-hide-the-missing-plugin-notifications.patch Thanks, this looks good to me now!
Attachment #8380987 - Flags: review?(georg.fritzsche) → feedback+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: