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

Unified Diff: chrome/browser/ui/views/profiles/avatar_menu_button.cc

Issue 686353002: Fix transparent avatar icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linux compile Created 6 years, 2 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/profiles/avatar_menu_button.cc
diff --git a/chrome/browser/ui/views/profiles/avatar_menu_button.cc b/chrome/browser/ui/views/profiles/avatar_menu_button.cc
index 7768d1c890b558be88a4a51f126360477bc48c43..426a36cc47f6f9f6a1af53340211bf74beda76c5 100644
--- a/chrome/browser/ui/views/profiles/avatar_menu_button.cc
+++ b/chrome/browser/ui/views/profiles/avatar_menu_button.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_metrics.h"
+#include "chrome/browser/profiles/profile_shortcut_manager_win.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
@@ -107,12 +108,18 @@ void AvatarMenuButton::GetAvatarImages(Profile* profile,
*avatar = rb.GetImageNamed(IDR_OTR_ICON);
// TODO(nkostylev): Allow this on ChromeOS once the ChromeOS test
// environment handles profile directories correctly.
-#if !defined(OS_CHROMEOS)
- bool is_badge_rectangle = false;
+#if defined(OS_WIN)
// The taskbar badge should be the profile avatar, not the OTR avatar.
- AvatarMenu::GetImageForMenuButton(profile,
- taskbar_badge_avatar,
- &is_badge_rectangle);
+ if (switches::IsNewAvatarMenu()) {
+ ProfileShortcutManagerWin::GetBadgingAvatarImages(
noms (inactive) 2014/10/30 17:39:08 I don't think this should do different things base
Roger Tawa OOO till Jul 10th 2014/10/31 19:44:39 Done.
+ g_browser_process->profile_manager(), profile->GetPath(),
+ taskbar_badge_avatar, NULL);
+ } else {
+ bool is_badge_rectangle = false;
+ AvatarMenu::GetImageForMenuButton(profile,
+ taskbar_badge_avatar,
+ &is_badge_rectangle);
+ }
#endif
} else if (AvatarMenu::ShouldShowAvatarMenu()) {
ProfileInfoCache& cache =
@@ -123,6 +130,11 @@ void AvatarMenuButton::GetAvatarImages(Profile* profile,
if (switches::IsNewAvatarMenu()) {
*avatar = cache.GetAvatarIconOfProfileAtIndex(index);
+#if defined(OS_WIN)
+ ProfileShortcutManagerWin::GetBadgingAvatarImages(
+ g_browser_process->profile_manager(), profile->GetPath(),
+ taskbar_badge_avatar, NULL);
+#endif
} else {
AvatarMenu::GetImageForMenuButton(profile, avatar, is_rectangle);
}

Powered by Google App Engine
This is Rietveld 408576698