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

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

Issue 1452923002: Vectorize MD otr frame icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dont crash in tests Created 5 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
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 8e7369be136d5724f728a7e4277e79efbcf8d40b..4ca506cc2826080b1df50e1bc97d3423d25c76c5 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
@@ -208,8 +208,7 @@ void BrowserNonClientFrameView::UpdateOldAvatarButton() {
AddChildView(supervised_user_avatar_label_);
}
#endif
- avatar_button_ = new AvatarMenuButton(
- browser_view_->browser(), !browser_view_->IsRegularOrGuestSession());
+ avatar_button_ = new AvatarMenuButton(browser_view_);
avatar_button_->set_id(VIEW_ID_AVATAR_BUTTON);
AddChildView(avatar_button_);
// Invalidate here because adding a child does not invalidate the layout.
@@ -239,9 +238,9 @@ void BrowserNonClientFrameView::UpdateOldAvatarButton() {
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)) {
+ if (!AvatarMenuButton::GetAvatarImages(browser_view_, should_show_avatar_menu,
+ &avatar, &taskbar_badge_avatar,
+ &is_rectangle)) {
return;
}
@@ -307,10 +306,9 @@ void BrowserNonClientFrameView::UpdateTaskbarDecoration() {
// returns false, don't bother trying to update the taskbar decoration since
// the returned images are not initialized. This can happen if the user
// deletes the current profile.
- if (AvatarMenuButton::GetAvatarImages(browser_view_->browser()->profile(),
- AvatarMenu::ShouldShowAvatarMenu(),
- &avatar, &taskbar_badge_avatar,
- &is_rectangle)) {
+ if (AvatarMenuButton::GetAvatarImages(
+ browser_view_, AvatarMenu::ShouldShowAvatarMenu(), &avatar,
+ &taskbar_badge_avatar, &is_rectangle)) {
// For popups and panels which don't have the avatar button, we still
// 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

Powered by Google App Engine
This is Rietveld 408576698