You should document somewhere what the difference is between "@mozilla.org/system-alerts-service;1" and "@mozilla.org/alerts-service;1" (in particular, why we need both).
+ if (imgStatus == imgIRequest::STATUS_ERROR) {
+ // We have an error getting the image. Display the notification with no icon.
+ ShowAlert(NULL);
+ }
Should check mLoadedFrame here; if an error occurs after the first frame we could show the alert twice!
Did you copy the code for getting the application name from somewhere else? Can we share it somehow?
You should document somewhere what the difference is between "@mozilla. org/system- alerts- service; 1" and "@mozilla. org/alerts- service; 1" (in particular, why we need both).
+ if (imgStatus == imgIRequest: :STATUS_ ERROR) {
+ // We have an error getting the image. Display the notification with no icon.
+ ShowAlert(NULL);
+ }
Should check mLoadedFrame here; if an error occurs after the first frame we could show the alert twice!
Did you copy the code for getting the application name from somewhere else? Can we share it somehow?
+ nsCAutoString mAlertTitle;
+ nsCAutoString mAlertText;
nsCString
+ PRBool mLoadedFrame;
PRPackedBool
+ nsCOMPtr< nsAlertsIconLis tener> alertListener = new nsAlertsIconLis tener() ; >InitAlertAsync (aImageUrl, aAlertTitle, aAlertText);
+ return alertListener-
OOM check
Needs build-system review from Ted