Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h

Issue 127423002: Supports window teleports for notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix wallpaper private api test Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #ifndef CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEO S_H_
6 #define CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEO S_H_
7
8 #include <map>
9 #include <set>
10 #include <string>
11
12 #include "ui/message_center/notification_blocker.h"
13
14 namespace chrome {
15 class MultiUserWindowManager;
16 }
17
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();
27
28 // Checks the current desktop and update the list of users which owns windows
29 // on the current desktop.
30 void UpdateWindowOwners();
31
32 // Called by MultiUserWindowManager when the active user has changed.
33 void ActiveUserChanged(const std::string& user_id);
34
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;
40
41 private:
42 // Returns true if this blocker is actively working.
43 bool IsActive() const;
44
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_;
49
50 DISALLOW_COPY_AND_ASSIGN(MultiUserNotificationBlockerChromeOS);
51 };
52
53 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHRO MEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698