Index: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc |
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc |
index a77631ab3bdda85ebd1e0e2a6185100173a98861..5e104875fc255943300b012e574d2e11c89d258c 100644 |
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc |
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc |
@@ -362,6 +362,20 @@ bool MultiUserWindowManagerChromeOS::IsWindowOnDesktopOfUser( |
return presenting_user.empty() || presenting_user == user_id; |
} |
+bool MultiUserWindowManagerChromeOS::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. |
+ |
+ // Note: When the window manager the window is either on it's owners desktop |
+ // (and shows no icon) or it is now (in which it will show an icon). So we |
+ // can return here. |
Mr4D (OOO till 08-26)
2014/03/13 00:08:15
I think you can remove line 370-373.
oshima
2014/03/13 01:02:53
Done.
|
+ return !IsWindowOnDesktopOfUser(window, GetWindowOwner(window)); |
+ } |
+ return false; |
+} |
+ |
const std::string& MultiUserWindowManagerChromeOS::GetUserPresentingWindow( |
aura::Window* window) { |
WindowToEntryMap::iterator it = window_to_entry_.find(window); |
@@ -373,7 +387,8 @@ const std::string& MultiUserWindowManagerChromeOS::GetUserPresentingWindow( |
return it->second->show_for_user(); |
} |
-void MultiUserWindowManagerChromeOS::AddUser(Profile* profile) { |
+void MultiUserWindowManagerChromeOS::AddUser(content::BrowserContext* context) { |
+ Profile* profile = Profile::FromBrowserContext(context); |
const std::string& user_id = multi_user_util::GetUserIDFromProfile(profile); |
if (user_id_to_app_observer_.find(user_id) != user_id_to_app_observer_.end()) |
return; |