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

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

Issue 1009403002: Refactor the avatar button/icon class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 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_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 0e7cbcc0f413d2e04bcc121da5e0c4618bcb23fc..1c6d527fc53e5b232cb83e714764f34b31393284 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
@@ -215,26 +215,6 @@ void BrowserNonClientFrameView::UpdateAvatarInfo() {
avatar_button_ = nullptr;
frame_->GetRootView()->Layout();
}
-
- gfx::Image avatar;
- gfx::Image taskbar_badge_avatar;
- bool is_rectangle = false;
-
- // Update the avatar button in the window frame and the taskbar overlay.
- bool should_show_avatar_menu =
- avatar_button_ || AvatarMenu::ShouldShowAvatarMenu();
-
- if (!AvatarMenuButton::GetAvatarImages(
- browser_view_->browser()->profile(), should_show_avatar_menu, &avatar,
- &taskbar_badge_avatar, &is_rectangle)) {
- return;
- }
-
- // Disable the menu when we should not show the menu.
- if (avatar_button_ && !AvatarMenu::ShouldShowAvatarMenu())
- avatar_button_->SetEnabled(false);
- if (avatar_button_)
- avatar_button_->SetAvatarIcon(avatar, is_rectangle);
}
void BrowserNonClientFrameView::UpdateNewStyleAvatarInfo(

Powered by Google App Engine
This is Rietveld 408576698