Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / ash / multi_user / multi_user_notification_blocker_chromeos.h
blob5eab828eeb06705e237bdb78414e9981cf3a7612
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_
8 #include <map>
9 #include <set>
10 #include <string>
12 #include "ui/message_center/notification_blocker.h"
14 namespace chrome {
15 class MultiUserWindowManager;
18 // A notification blocker for per-profile stream switching. Owned and controlled
19 // by MultiUserWindowManagerChromeOS.
20 class MultiUserNotificationBlockerChromeOS
21 : public message_center::NotificationBlocker {
22 public:
23 MultiUserNotificationBlockerChromeOS(
24 message_center::MessageCenter* message_center,
25 chrome::MultiUserWindowManager* multi_user_window_manager);
26 virtual ~MultiUserNotificationBlockerChromeOS();
28 // Checks the current desktop and update the list of users which owns windows
29 // on the current desktop.
30 void UpdateWindowOwners();
32 // Called by MultiUserWindowManager when the active user has changed.
33 void ActiveUserChanged(const std::string& user_id);
35 // message_center::NotificationBlocker overrides:
36 virtual bool ShouldShowNotification(
37 const message_center::NotifierId& notifier_id) const OVERRIDE;
38 virtual bool ShouldShowNotificationAsPopup(
39 const message_center::NotifierId& notifier_id) const OVERRIDE;
41 private:
42 // Returns true if this blocker is actively working.
43 bool IsActive() const;
45 chrome::MultiUserWindowManager* multi_user_window_manager_; // Weak.
46 std::string active_user_id_;
47 std::map<std::string, bool> quiet_modes_;
48 std::set<std::string> current_user_ids_;
50 DISALLOW_COPY_AND_ASSIGN(MultiUserNotificationBlockerChromeOS);
53 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_