/usr/share/xul-ext/unity/content/unity-popup-manager.js is in xul-ext-unity 3.0.0+14.04.20140416-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
var Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
Cu.import("resource://gre/modules/PopupNotifications.jsm");
Cu.import("resource://unity/l10n.js");
UnityPopupManager = function (mainWindow) {
this.mainWindow = mainWindow;
}
UnityPopupManager.prototype.requestIntegration = function (document, name, domain, integrateCallback, dontAskActionCallback) {
var message = l10n.formatMessage('prompt.message', [name, domain]);
return this.mainWindow.PopupNotifications.show(this.mainWindow.gBrowser.getBrowserForDocument(document),
"unity-permission-popup",
message,
null,
{ label: l10n.formatMessage('prompt.yes'),
accessKey: l10n.formatMessage('prompt.yesAccessKey'),
callback: integrateCallback },
[
{ label: l10n.formatMessage('prompt.no'),
accessKey: l10n.formatMessage('prompt.noAccessKey'),
callback: new Function() },
{ label: l10n.formatMessage('prompt.dontask'),
accessKey: l10n.formatMessage('prompt.dontaskAccessKey'),
callback: dontAskActionCallback }
]);
}
var EXPORTED_SYMBOLS = ["UnityPopupManager"];
|