1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_
12 #include "ui/message_center/notification_blocker.h"
14 // A notification blocker for per-profile stream switching. Owned and controlled
15 // by MultiUserWindowManagerChromeOS.
16 class MultiUserNotificationBlockerChromeOS
17 : public message_center::NotificationBlocker
{
19 MultiUserNotificationBlockerChromeOS(
20 message_center::MessageCenter
* message_center
,
21 const std::string
& initial_user_id
);
22 ~MultiUserNotificationBlockerChromeOS() override
;
24 // Called by MultiUserWindowManager when the active user has changed.
25 void ActiveUserChanged(const std::string
& user_id
);
27 // message_center::NotificationBlocker overrides:
28 bool ShouldShowNotification(
29 const message_center::NotifierId
& notifier_id
) const override
;
30 bool ShouldShowNotificationAsPopup(
31 const message_center::NotifierId
& notifier_id
) const override
;
34 // Returns true if this blocker is actively working.
35 bool IsActive() const;
37 std::string active_user_id_
;
38 std::map
<std::string
, bool> quiet_modes_
;
40 DISALLOW_COPY_AND_ASSIGN(MultiUserNotificationBlockerChromeOS
);
43 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_