Bug 1492095 - Replace use of XPCOM 'embedcomp/appstartup-notifier' after its removal in bug 1491741. r=philipp
--HG-- extra : rebase_source : 5c4064e09c129439edbb9e9b18600065ec5239c0
This commit is contained in:
Родитель
2b0db583d8
Коммит
ccbcfa57ce
|
@ -21,6 +21,9 @@ function calAlarmMonitor() {
|
|||
|
||||
this.mSound = Components.classes["@mozilla.org/sound;1"]
|
||||
.createInstance(Components.interfaces.nsISound);
|
||||
|
||||
Services.obs.addObserver(this, "alarm-service-startup");
|
||||
Services.obs.addObserver(this, "alarm-service-shutdown");
|
||||
}
|
||||
|
||||
var calAlarmMonitorClassID = Components.ID("{4b7ae030-ed79-11d9-8cd6-0800200c9a66}");
|
||||
|
|
|
@ -227,11 +227,10 @@ calAlarmService.prototype = {
|
|||
Services.obs.addObserver(this, "xpcom-shutdown");
|
||||
Services.obs.addObserver(this, "wake_notification");
|
||||
|
||||
/* Tell people that we're alive so they can start monitoring alarms.
|
||||
*/
|
||||
let notifier = Components.classes["@mozilla.org/embedcomp/appstartup-notifier;1"]
|
||||
.getService(Components.interfaces.nsIObserver);
|
||||
notifier.observe(null, "alarm-service-startup", null);
|
||||
// Make sure the alarm monitor is alive so it's observing the notification.
|
||||
Cc["@mozilla.org/calendar/alarm-monitor;1"].getService(Ci.calIAlarmServiceObserver);
|
||||
// Tell people that we're alive so they can start monitoring alarms.
|
||||
Services.obs.notifyObservers(null, "alarm-service-startup");
|
||||
|
||||
cal.getCalendarManager().addObserver(this.calendarManagerObserver);
|
||||
|
||||
|
@ -281,10 +280,8 @@ calAlarmService.prototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
/* tell people that we're no longer running */
|
||||
let notifier = Components.classes["@mozilla.org/embedcomp/appstartup-notifier;1"]
|
||||
.getService(Components.interfaces.nsIObserver);
|
||||
notifier.observe(null, "alarm-service-shutdown", null);
|
||||
// Tell people that we're no longer running.
|
||||
Services.obs.notifyObservers(null, "alarm-service-shutdown");
|
||||
|
||||
if (this.mUpdateTimer) {
|
||||
this.mUpdateTimer.cancel();
|
||||
|
|
|
@ -11,8 +11,8 @@ this.NSGetFactory = (cid) => {
|
|||
"resource://calendar/calendar-js/calCachedCalendar.js",
|
||||
|
||||
"resource://calendar/calendar-js/calAlarm.js",
|
||||
"resource://calendar/calendar-js/calAlarmService.js",
|
||||
"resource://calendar/calendar-js/calAlarmMonitor.js",
|
||||
"resource://calendar/calendar-js/calAlarmService.js",
|
||||
"resource://calendar/calendar-js/calAttendee.js",
|
||||
"resource://calendar/calendar-js/calAttachment.js",
|
||||
"resource://calendar/calendar-js/calCalendarManager.js",
|
||||
|
@ -39,7 +39,7 @@ this.NSGetFactory = (cid) => {
|
|||
}
|
||||
|
||||
let components = [
|
||||
calAlarm, calAlarmService, calAlarmMonitor, calAttendee, calAttachment, calCalendarManager,
|
||||
calAlarm, calAlarmMonitor, calAlarmService, calAttendee, calAttachment, calCalendarManager,
|
||||
calCalendarSearchService, calDateTimeFormatter, calDeletedItems, calEvent, calFreeBusyService,
|
||||
calIcsParser, calIcsSerializer, calItipItem, calProtocolHandlerWebcal,
|
||||
calProtocolHandlerWebcals, calRecurrenceDate, calRecurrenceInfo, calRelation,
|
||||
|
|
|
@ -6,8 +6,6 @@ contract @mozilla.org/calendar/alarm-service;1 {7a9200dd-6a64-4fff-a798-c5802186
|
|||
|
||||
component {4b7ae030-ed79-11d9-8cd6-0800200c9a66} calItemModule.js
|
||||
contract @mozilla.org/calendar/alarm-monitor;1 {4b7ae030-ed79-11d9-8cd6-0800200c9a66}
|
||||
category alarm-service-startup calendar-alarm-monitor service,@mozilla.org/calendar/alarm-monitor;1
|
||||
category alarm-service-shutdown calendar-alarm-monitor service,@mozilla.org/calendar/alarm-monitor;1
|
||||
|
||||
component {5c8dcaa3-170c-4a73-8142-d531156f664d} calItemModule.js
|
||||
contract @mozilla.org/calendar/attendee;1 {5c8dcaa3-170c-4a73-8142-d531156f664d}
|
||||
|
|
Загрузка…
Ссылка в новой задаче