Chromium Code Reviews| Index: chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h |
| diff --git a/chrome/browser/notifications/multi_user_notification_blocker_chromeos.h b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h |
| similarity index 54% |
| rename from chrome/browser/notifications/multi_user_notification_blocker_chromeos.h |
| rename to chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h |
| index 6dd92fa56c5bec1a77691f15720c227b26e1692b..30bbcfa540c1ce9ce3d5bb40dbec93c96f450cc5 100644 |
| --- a/chrome/browser/notifications/multi_user_notification_blocker_chromeos.h |
| +++ b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h |
| @@ -2,48 +2,46 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_NOTIFICATIONS_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_ |
| -#define CHROME_BROWSER_NOTIFICATIONS_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_ |
| +#ifndef CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_ |
| +#define CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_ |
| #include <map> |
| +#include <set> |
| #include <string> |
| -#include "ash/shell_observer.h" |
| -#include "chrome/browser/chromeos/login/user_manager.h" |
| -#include "chromeos/login/login_state.h" |
| #include "ui/message_center/notification_blocker.h" |
| -// A notification blocker for per-profile stream switching. |
| +// A notification blocker for per-profile stream switching. Owned and controlled |
| +// by MultiUserWindowManagerChromeOS. |
| class MultiUserNotificationBlockerChromeOS |
| - : public message_center::NotificationBlocker, |
| - public ash::ShellObserver, |
| - public chromeos::UserManager::UserSessionStateObserver { |
| + : public message_center::NotificationBlocker { |
| public: |
| explicit MultiUserNotificationBlockerChromeOS( |
| message_center::MessageCenter* message_center); |
| virtual ~MultiUserNotificationBlockerChromeOS(); |
| + // Checks the current desktop and update the list of users which owns windows |
| + // on the current desktop. |
| + void UpdateWindowOwners(); |
| + |
| + // Called by MultiUserWindowManager when the the active user has changed. |
|
Mr4D (OOO till 08-26)
2014/01/08 17:29:35
nit: .. when the active ..
Jun Mukai
2014/01/08 20:41:24
Done.
|
| + void ActiveUserChanged(const std::string& user_id); |
| + |
| // message_center::NotificationBlocker overrides: |
| virtual bool ShouldShowNotification( |
| const message_center::NotifierId& notifier_id) const OVERRIDE; |
| virtual bool ShouldShowNotificationAsPopup( |
| const message_center::NotifierId& notifier_id) const OVERRIDE; |
| - // ash::ShellObserver overrides: |
| - virtual void OnAppTerminating() OVERRIDE; |
| - |
| - // chromeos::UserManager::UserSessionStateObserver overrides: |
| - virtual void ActiveUserChanged(const chromeos::User* active_user) OVERRIDE; |
| - |
| private: |
| // Returns true if this blocker is actively working. |
| bool IsActive() const; |
| std::string active_user_id_; |
| - bool observing_; |
| std::map<std::string, bool> quiet_modes_; |
| + std::set<std::string> current_user_ids_; |
| DISALLOW_COPY_AND_ASSIGN(MultiUserNotificationBlockerChromeOS); |
| }; |
| -#endif // CHROME_BROWSER_NOTIFICATIONS_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_ |
| +#endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_NOTIFICATION_BLOCKER_CHROMEOS_H_ |