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

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

Issue 54053008: Re-enable runtime badging of browser windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO Created 7 years, 1 month 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 | « no previous file | 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_non_client_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
index 429cd5b86c79e49cf6f21e4450c8cac983b77a84..0840c71e3f6f4dd7dc38f8a55f26a8ab2f6ab773 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
@@ -116,15 +116,16 @@ void BrowserNonClientFrameView::UpdateAvatarInfo() {
}
// For popups and panels which don't have the avatar button, we still
- // need to draw the taskbar decoration. Draw the avatar for
- // custom-user-data-dir windows which don't support having a shortcut icon.
- // For non-custom-user-data-dir windows, the window's relaunch details are set
- // so that the profile's shortcut icon is used, which includes this badge.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserDataDir)) {
- chrome::DrawTaskbarDecoration(
- frame_->GetNativeWindow(),
- AvatarMenu::ShouldShowAvatarMenu() ? &avatar : NULL);
- }
+ // need to draw the taskbar decoration. Even though we have an icon on the
+ // window's relaunch details, we draw over it because the user may have pinned
+ // the badge-less Chrome shortcut which will cause windows to ignore the
+ // relaunch details.
+ // TODO(calamity): ideally this should not be necessary but due to issues with
+ // the default shortcut being pinned, we add the runtime badge for safety.
+ // See crbug.com/313800.
+ chrome::DrawTaskbarDecoration(
+ frame_->GetNativeWindow(),
+ AvatarMenu::ShouldShowAvatarMenu() ? &avatar : NULL);
}
void BrowserNonClientFrameView::UpdateNewStyleAvatarInfo(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698