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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.h

Issue 627593003: Adding infrastructure for possibility of changing manager names for the supervised accounts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Daniel's comments addressed. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
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 8e68e2fb94a2aaacb9c732ec3e35d5d8e4e4cac8..20253ae55c01dd8d63cf8090aef872bd38b8a022 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,10 @@ class SystemTrayDelegateChromeOS
virtual bool IsSearchKeyMappedToCapsLock() override;
virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate(
const std::string& user_id) override;
+ virtual void AddCustodianInfoTrayObserver(
+ ash::CustodianInfoTrayObserver* observer) override;
+ virtual void RemoveCustodianInfoTrayObserver(
+ ash::CustodianInfoTrayObserver* observer) override;
// browser tests need to call ShouldUse24HourClock().
bool GetShouldUse24HourClockForTesting() const;
@@ -157,6 +167,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 +243,9 @@ class SystemTrayDelegateChromeOS
// Overridden from extensions::AppWindowRegistry::Observer:
virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) override;
+ // Overridden from SupervisedUserServiceObserver:
+ virtual void OnCustodianInfoChanged() OVERRIDE;
Daniel Erat 2014/10/08 14:10:46 s/OVERRIDE/override/ to match the rest of this fil
+
void OnAccessibilityStatusChanged(
const AccessibilityStatusEventDetails& details);
@@ -256,6 +271,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);

Powered by Google App Engine
This is Rietveld 408576698