Index: chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc |
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc |
index c30b5cc4789d2eb5417bd9baf3b40cb285441e58..fc2697829e0638e00d8803a1f1b8ac8100991616 100644 |
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc |
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc |
@@ -66,6 +66,19 @@ MultiUserWindowManager::GetMultiProfileMode() { |
return multi_user_mode_; |
} |
+// satic |
+bool MultiUserWindowManager::ShouldShowAvatar(aura::Window* window) { |
+ // Note: In case of the M-31 mode the window manager won't exist. |
+ if (GetMultiProfileMode() == MULTI_PROFILE_MODE_SEPARATED) { |
+ // If the window is shown on a different desktop than the user, it should |
+ // have the avatar icon |
+ MultiUserWindowManager* instance = GetInstance(); |
+ return !instance->IsWindowOnDesktopOfUser(window, |
+ instance->GetWindowOwner(window)); |
+ } |
+ return false; |
+} |
+ |
// static |
void MultiUserWindowManager::DeleteInstance() { |
DCHECK(g_instance); |