mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1208295 - Dispatch notifications-open-settings upon receiving alertsettingscallback so UI can open notification settings. r=nsm
alertsettingscallback only goes to the single observer whereas notifications-open-settings goes through the global observer service.
This commit is contained in:
parent
44633993e7
commit
21a4142e43
@ -1161,6 +1161,15 @@ NotificationObserver::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
}
|
||||
permissionManager->RemoveFromPrincipal(mPrincipal, "desktop-notification");
|
||||
return NS_OK;
|
||||
} else if (!strcmp("alertsettingscallback", aTopic)) {
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
if (!obs) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// Notify other observers so they can show settings UI.
|
||||
obs->NotifyObservers(mPrincipal, "notifications-open-settings", nullptr);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return mObserver->Observe(aSubject, aTopic, aData);
|
||||
|
Loading…
Reference in New Issue
Block a user