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

Unified Diff: ash/system/user/tray_user.cc

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback Created 4 years, 6 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/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index e7617d9d9821f56c858f3d5673b814551a6c9659..db2fda0ebac3502f1d3a7a1538d4d08eca4d3fb1 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -9,6 +9,7 @@
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
+#include "ash/common/wm_shell.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_util.h"
#include "ash/shell.h"
@@ -129,7 +130,7 @@ void TrayUser::UpdateAfterLoginStatusChange(LoginStatus status) {
return;
bool need_label = false;
bool need_avatar = false;
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
+ SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate();
if (delegate->IsUserSupervised())
need_label = true;
switch (status) {
@@ -233,8 +234,8 @@ void TrayUser::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
}
void TrayUser::OnUserUpdate() {
- UpdateAvatarImage(Shell::GetInstance()->system_tray_delegate()->
- GetUserLoginStatus());
+ UpdateAvatarImage(
+ WmShell::Get()->system_tray_delegate()->GetUserLoginStatus());
}
void TrayUser::OnUserAddedToSession() {
@@ -249,7 +250,7 @@ void TrayUser::OnUserAddedToSession() {
// Update the user item.
UpdateAvatarImage(
- Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus());
+ WmShell::Get()->system_tray_delegate()->GetUserLoginStatus());
}
void TrayUser::UpdateAvatarImage(LoginStatus status) {

Powered by Google App Engine
This is Rietveld 408576698