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

Unified Diff: ash/system/chromeos/supervised/tray_supervised_user.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: Specific observer class introduced. 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: ash/system/chromeos/supervised/tray_supervised_user.h
diff --git a/ash/system/chromeos/supervised/tray_supervised_user.h b/ash/system/chromeos/supervised/tray_supervised_user.h
index 5d07d25feb4e5371546f4f861fb12d180bf955a6..00b5b09a8a2453d002e6a804286214d30f954d6a 100644
--- a/ash/system/chromeos/supervised/tray_supervised_user.h
+++ b/ash/system/chromeos/supervised/tray_supervised_user.h
@@ -6,8 +6,10 @@
#define ASH_SYSTEM_CHROMEOS_SUPERVISED_TRAY_SUPERVISED_USER_H
#include "ash/ash_export.h"
+#include "ash/system/chromeos/supervised/custodian_info_tray_observer.h"
#include "ash/system/tray/system_tray_item.h"
#include "ash/system/tray/view_click_listener.h"
+#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
namespace ash {
@@ -15,7 +17,8 @@ class LabelTrayView;
class SystemTray;
class ASH_EXPORT TraySupervisedUser : public SystemTrayItem,
- public ViewClickListener {
+ public ViewClickListener,
+ public CustodianInfoTrayObserver {
public:
explicit TraySupervisedUser(SystemTray* system_tray);
virtual ~TraySupervisedUser();
@@ -32,6 +35,9 @@ class ASH_EXPORT TraySupervisedUser : public SystemTrayItem,
// Overridden from ViewClickListener.
virtual void OnViewClicked(views::View* sender) OVERRIDE;
+ // Overridden from CustodianInfoTrayObserver:
+ void OnCustodianInfoChanged();
+
private:
friend class TraySupervisedUserTest;
@@ -39,13 +45,18 @@ class ASH_EXPORT TraySupervisedUser : public SystemTrayItem,
void CreateOrUpdateNotification(const base::string16& new_message);
+ void CreateOrUpdateSupervisedWarningNotification();
+
LabelTrayView* tray_view_;
+
// Previous login status to avoid showing notification upon unlock.
user::LoginStatus status_;
// Previous user supervised state to avoid showing notification upon unlock.
bool is_user_supervised_;
+ base::WeakPtrFactory<CustodianInfoTrayObserver> weak_factory_observers_;
+
DISALLOW_COPY_AND_ASSIGN(TraySupervisedUser);
};

Powered by Google App Engine
This is Rietveld 408576698