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

Unified Diff: chrome/browser/ui/views/frame/browser_view.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
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest_chromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 75e03a8a25ce921ecb4f2883c3574043e1577b0a..c91590da652bb757ee0ef4e38ff42f0d47480ba3 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -591,33 +591,16 @@ bool BrowserView::ShouldShowAvatar() const {
#if defined(OS_CHROMEOS)
if (IsOffTheRecord() && !IsGuestSession())
return true;
-
- // Note: In case of the M-31 mode the window manager won't exist.
- if (chrome::MultiUserWindowManager::GetMultiProfileMode() ==
- chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_SEPARATED) {
- // This function is called via BrowserNonClientFrameView::UpdateAvatarInfo
- // during the creation of the BrowserWindow, so browser->window() will not
- // yet be set. In this case we can safely return false.
- if (!browser_->window())
- return false;
-
- // If the window is shown on a different desktop than the user, it should
- // have the avatar icon.
- aura::Window* window = browser_->window()->GetNativeWindow();
-
- // 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.
- chrome::MultiUserWindowManager* window_manager =
- chrome::MultiUserWindowManager::GetInstance();
- return !window_manager->IsWindowOnDesktopOfUser(
- window,
- window_manager->GetWindowOwner(window));
- }
+ // This function is called via BrowserNonClientFrameView::UpdateAvatarInfo
+ // during the creation of the BrowserWindow, so browser->window() will not
+ // yet be set. In this case we can safely return false.
+ if (!browser_->window())
+ return false;
+ return chrome::MultiUserWindowManager::ShouldShowAvatar(
+ browser_->window()->GetNativeWindow());
#else
if (IsOffTheRecord()) // Desktop guest is incognito and needs avatar.
return true;
-#endif
// Tests may not have a profile manager.
if (!g_browser_process->profile_manager())
return false;
@@ -629,6 +612,7 @@ bool BrowserView::ShouldShowAvatar() const {
}
return AvatarMenu::ShouldShowAvatarMenu();
+#endif
}
bool BrowserView::GetAccelerator(int cmd_id, ui::Accelerator* accelerator) {
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698