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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc

Issue 1307093004: Remove references to IsNewAvatarMenu since the flag was removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert FRAME_AVATAR_BUTTON changes. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 9 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
10 #include "ash/frame/default_header_painter.h" 10 #include "ash/frame/default_header_painter.h"
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 gfx::Rect avatar_bounds(kAvatarSideSpacing, 568 gfx::Rect avatar_bounds(kAvatarSideSpacing,
569 avatar_y, 569 avatar_y,
570 incognito_icon.width(), 570 incognito_icon.width(),
571 avatar_height); 571 avatar_height);
572 avatar_button()->SetBoundsRect(avatar_bounds); 572 avatar_button()->SetBoundsRect(avatar_bounds);
573 avatar_button()->SetVisible(avatar_visible); 573 avatar_button()->SetVisible(avatar_visible);
574 } 574 }
575 575
576 #if defined(FRAME_AVATAR_BUTTON) 576 #if defined(FRAME_AVATAR_BUTTON)
577 void BrowserNonClientFrameViewAsh::LayoutNewStyleAvatar() { 577 void BrowserNonClientFrameViewAsh::LayoutNewStyleAvatar() {
578 DCHECK(switches::IsNewAvatarMenu()); 578 DCHECK(new_avatar_button());
579 579
580 gfx::Size button_size = new_avatar_button()->GetPreferredSize(); 580 gfx::Size button_size = new_avatar_button()->GetPreferredSize();
581 int button_x = width() - 581 int button_x = width() -
582 caption_button_container_->GetPreferredSize().width() - 582 caption_button_container_->GetPreferredSize().width() -
583 kNewAvatarButtonOffset - button_size.width(); 583 kNewAvatarButtonOffset - button_size.width();
584 584
585 new_avatar_button()->SetBounds( 585 new_avatar_button()->SetBounds(
586 button_x, 586 button_x,
587 0, 587 0,
588 button_size.width(), 588 button_size.width(),
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 } 710 }
711 } 711 }
712 712
713 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) { 713 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) {
714 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()); 714 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle());
715 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), 715 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(),
716 width(), kClientEdgeThickness), 716 width(), kClientEdgeThickness),
717 ThemeProperties::GetDefaultColor( 717 ThemeProperties::GetDefaultColor(
718 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); 718 ThemeProperties::COLOR_TOOLBAR_SEPARATOR));
719 } 719 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698