Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.h |
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h |
index f42e8a97db2da7cdaea912aa062eaaefbdb30cc2..cf28d274f896da173ef926b7b86e7dc55ff4aa9b 100644 |
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h |
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h |
@@ -5,20 +5,25 @@ |
#ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
#define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
+#include <vector> |
+ |
#include "ash/ime/input_method_menu_manager.h" |
#include "ash/session/session_state_observer.h" |
+#include "ash/system/chromeos/supervised/custodian_info_tray_observer.h" |
#include "ash/system/tray/system_tray.h" |
#include "ash/system/tray/system_tray_delegate.h" |
#include "ash/system/tray/system_tray_notifier.h" |
+#include "base/callback_forward.h" |
#include "base/callback_list.h" |
#include "base/compiler_specific.h" |
#include "base/containers/scoped_ptr_hash_map.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/observer_list.h" |
#include "base/prefs/pref_change_registrar.h" |
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
#include "chrome/browser/profiles/profile.h" |
-#include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
+#include "chrome/browser/supervised_user/supervised_user_service_observer.h" |
#include "chrome/browser/ui/browser_list_observer.h" |
#include "chromeos/audio/cras_audio_handler.h" |
#include "chromeos/dbus/session_manager_client.h" |
@@ -45,7 +50,8 @@ class SystemTrayDelegateChromeOS |
public policy::CloudPolicyStore::Observer, |
public ash::SessionStateObserver, |
public chrome::BrowserListObserver, |
- public extensions::AppWindowRegistry::Observer { |
+ public extensions::AppWindowRegistry::Observer, |
+ public SupervisedUserServiceObserver { |
public: |
SystemTrayDelegateChromeOS(); |
@@ -126,6 +132,9 @@ class SystemTrayDelegateChromeOS |
virtual bool IsSearchKeyMappedToCapsLock() OVERRIDE; |
virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate( |
const std::string& user_id) OVERRIDE; |
+ virtual void AddObserver(ash::CustodianInfoTrayObserver* observer) OVERRIDE; |
Daniel Erat
2014/10/07 16:16:00
nit: rename these to AddCustodianInfoTrayObserver
merkulova
2014/10/08 09:19:37
Done.
|
+ virtual void RemoveObserver( |
+ ash::CustodianInfoTrayObserver* observer) OVERRIDE; |
// browser tests need to call ShouldUse24HourClock(). |
bool GetShouldUse24HourClockForTesting() const; |
@@ -157,6 +166,8 @@ class SystemTrayDelegateChromeOS |
void StopObservingAppWindowRegistry(); |
+ void StopObservingCustodianInfoChanges(); |
+ |
// Notify observers if the current user has no more open browser or app |
// windows. |
void NotifyIfLastWindowClosed(); |
@@ -231,6 +242,9 @@ class SystemTrayDelegateChromeOS |
// Overridden from extensions::AppWindowRegistry::Observer: |
virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) OVERRIDE; |
+ // Overridden from SupervisedUserServiceObserver: |
+ virtual void OnCustodianInfoChanged() OVERRIDE; |
+ |
void OnAccessibilityStatusChanged( |
const AccessibilityStatusEventDetails& details); |
@@ -256,6 +270,9 @@ class SystemTrayDelegateChromeOS |
base::ScopedPtrHashMap<std::string, ash::tray::UserAccountsDelegate> |
accounts_delegates_; |
+ ObserverList<ash::CustodianInfoTrayObserver> |
+ custodian_info_changed_observers_; |
+ |
base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); |