Bug 743312 Followup for when doorhangers have been disabled r=InvisibleSmiley
--- a/suite/common/bindings/notification.xml
+++ b/suite/common/bindings/notification.xml
@@ -451,20 +451,16 @@
if (!objLoadingContent.activated)
objLoadingContent.playPlugin();
}
this.removePluginClickToPlayPrompt();
]]>
</body>
</method>
- <method name="showPluginClickToPlayPrompt"/>
-
- <method name="removePluginClickToPlayPrompt"/>
-
<method name="openURLPref">
<parameter name="aPref"/>
<body>
<![CDATA[
var url = this._urlFormatter.formatURLPref(aPref);
var nsIBrowserDOMWindow = Components.interfaces.nsIBrowserDOMWindow;
var browserWin;
@@ -968,16 +964,44 @@
null,this.PRIORITY_INFO_MEDIUM,
buttons);
box.persistence = 1;
box.timeout = Date.now() + 20000; // 20 seconds
]]>
</body>
</method>
+ <method name="removePluginClickToPlayPrompt">
+ <body>
+ <![CDATA[
+ var notification = this.getNotificationWithValue("click-to-play-plugins");
+ if (notification)
+ this.removeNotification(notification);
+ ]]>
+ </body>
+ </method>
+
+ <method name="showPluginClickToPlayPrompt">
+ <body>
+ <![CDATA[
+ this.clickToPlayPromptShown = true;
+ var messageString = this._stringBundle.GetStringFromName("activatePluginsMessage.message");
+ var buttons = [{
+ label: this._stringBundle.GetStringFromName("activatePluginsMessage.label"),
+ accessKey: this._stringBundle.GetStringFromName("activatePluginsMessage.accesskey"),
+ callback: this.activatePlugins.bind(this)
+ }];
+ this.appendNotification(messageString, "click-to-play-plugins",
+ "chrome://mozapps/skin/plugins/pluginGeneric.png",
+ this.PRIORITY_INFO_HIGH,
+ buttons);
+ ]]>
+ </body>
+ </method>
+
<method name="showGeolocationPrompt">
<parameter name="file"/>
<parameter name="site"/>
<parameter name="image"/>
<parameter name="allowCallback"/>
<parameter name="cancelCallback"/>
<body>
<![CDATA[