1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsSystemAlertsService_h__
7 #define nsSystemAlertsService_h__
9 #include "nsIAlertsService.h"
10 #include "nsTHashMap.h"
12 class nsAlertsIconListener
;
14 class nsSystemAlertsService
: public nsIAlertsService
,
15 public nsIAlertsDoNotDisturb
{
17 NS_DECL_NSIALERTSSERVICE
18 NS_DECL_NSIALERTSDONOTDISTURB
21 nsSystemAlertsService();
25 bool IsActiveListener(const nsAString
& aAlertName
,
26 nsAlertsIconListener
* aListener
);
27 void RemoveListener(const nsAString
& aAlertName
,
28 nsAlertsIconListener
* aListener
);
31 virtual ~nsSystemAlertsService();
33 void AddListener(const nsAString
& aAlertName
,
34 nsAlertsIconListener
* aListener
);
36 nsTHashMap
<nsStringHashKey
, nsAlertsIconListener
*> mActiveListeners
;
39 bool mSuppressForScreenSharing
= false;
42 #endif /* nsSystemAlertsService_h__ */