2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* 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/. */
|
2009-04-09 05:13:16 +00:00
|
|
|
|
|
|
|
const Ci = Components.interfaces;
|
2010-07-13 14:36:09 +00:00
|
|
|
const Cu = Components.utils;
|
2009-04-09 05:13:16 +00:00
|
|
|
|
2010-07-13 14:36:09 +00:00
|
|
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
|
|
Cu.import("resource://gre/modules/Services.jsm");
|
2009-04-09 05:13:16 +00:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
// Alerts Service
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
function AlertsService() { }
|
|
|
|
|
|
|
|
AlertsService.prototype = {
|
|
|
|
classID: Components.ID("{fe33c107-82a4-41d6-8c64-5353267e04c9}"),
|
|
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAlertsService]),
|
|
|
|
|
|
|
|
showAlertNotification: function(aImageUrl, aTitle, aText, aTextClickable, aCookie, aAlertListener, aName) {
|
2010-07-13 14:36:09 +00:00
|
|
|
let browser = Services.wm.getMostRecentWindow("navigator:browser");
|
2009-04-09 05:13:16 +00:00
|
|
|
browser.AlertsHelper.showAlertNotification(aImageUrl, aTitle, aText, aTextClickable, aCookie, aAlertListener);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-10-31 16:13:28 +00:00
|
|
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([AlertsService]);
|