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

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: Rebase Created 5 years, 7 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 | « no previous file | chrome/browser/ui/views/profiles/avatar_base_button.h » ('j') | 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 ba42d91f72f012c7102190799b6d4e82fa791f75..0f0bda8e2b4be5e45e8dbfc5ea27df2eeb12db65 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::UpdateOldAvatarButton() {
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::UpdateNewAvatarButton(
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/avatar_base_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698