Files
tubestation/toolkit/components/alerts/nsAlertsService.h
Kagami Sascha Rosylight 7612090ebe Bug 1953906 - Implement nsIAlertsService:[Pbm]Teardown r=nalexander,nrishel,geckoview-reviewers,win-reviewers,m_kato,jstutte
Longer term we should move this tracking fully to nsAlertsService, but given that:

* currently it's different how each alert backend tracks notification (e.g. only Windows has IsPrivate() and macOS has separate lists for pending/active alerts)
* consolidating that would probably require bigger changes

it would be nice to first centralize how the teardown step is triggered and then try consolidating further. (See also bug 1953657.)

Differential Revision: https://phabricator.services.mozilla.com/D241477
2025-03-21 09:52:31 +00:00

35 lines
934 B
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
#ifndef nsAlertsService_h__
#define nsAlertsService_h__
#include "nsIAlertsService.h"
#include "nsCOMPtr.h"
class nsAlertsService : public nsIAlertsService,
public nsIAlertsDoNotDisturb,
public nsIObserver {
public:
NS_DECL_NSIALERTSDONOTDISTURB
NS_DECL_NSIALERTSSERVICE
NS_DECL_NSIOBSERVER
NS_DECL_ISUPPORTS
nsAlertsService();
nsresult Init();
protected:
virtual ~nsAlertsService();
bool ShouldShowAlert();
bool ShouldUseSystemBackend();
already_AddRefed<nsIAlertsDoNotDisturb> GetDNDBackend();
nsCOMPtr<nsIAlertsService> mBackend;
};
#endif /* nsAlertsService_h__ */