Backed out changeset bcbab342eed8 (bug 1889658) for causing wpt reftest failures...
[gecko.git] / toolkit / system / gnome / nsSystemAlertsService.h
blobd24168e9af96f13e82a60f0b34496481ded06ee5
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 {
16 public:
17 NS_DECL_NSIALERTSSERVICE
18 NS_DECL_NSIALERTSDONOTDISTURB
19 NS_DECL_ISUPPORTS
21 nsSystemAlertsService();
23 nsresult Init();
25 bool IsActiveListener(const nsAString& aAlertName,
26 nsAlertsIconListener* aListener);
27 void RemoveListener(const nsAString& aAlertName,
28 nsAlertsIconListener* aListener);
30 protected:
31 virtual ~nsSystemAlertsService();
33 void AddListener(const nsAString& aAlertName,
34 nsAlertsIconListener* aListener);
36 nsTHashMap<nsStringHashKey, nsAlertsIconListener*> mActiveListeners;
38 private:
39 bool mSuppressForScreenSharing = false;
42 #endif /* nsSystemAlertsService_h__ */