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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc

Issue 197773004: Move avatar holder code to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 6 years, 9 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/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);

Powered by Google App Engine
This is Rietveld 408576698