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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 200483004: Show avatar icon on V2 app's frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/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 c91590da652bb757ee0ef4e38ff42f0d47480ba3..2b003da75a3c7cc8e95ad36267961e4a36aff2c1 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -586,9 +586,11 @@ int BrowserView::GetGuestIconResourceID() const {
}
bool BrowserView::ShouldShowAvatar() const {
- if (!IsBrowserTypeNormal())
- return false;
#if defined(OS_CHROMEOS)
+ // Cros shows the avatar on both browser and v1 app.
pkotwicz 2014/03/18 04:41:15 Nit: Cros -> CrOS
+ if (!browser_->is_type_tabbed() && !browser_->is_app())
+ return false;
+ // Don't show incognito avatar in the geust session.
pkotwicz 2014/03/18 04:41:15 Nit: geust -> guest
if (IsOffTheRecord() && !IsGuestSession())
return true;
// This function is called via BrowserNonClientFrameView::UpdateAvatarInfo
@@ -599,6 +601,8 @@ bool BrowserView::ShouldShowAvatar() const {
return chrome::MultiUserWindowManager::ShouldShowAvatar(
browser_->window()->GetNativeWindow());
#else
+ if (!IsBrowserTypeNormal())
+ return false;
if (IsOffTheRecord()) // Desktop guest is incognito and needs avatar.
return true;
// Tests may not have a profile manager.

Powered by Google App Engine
This is Rietveld 408576698