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

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: Address review feedback 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 int avatar_height = avatar_visible ? avatar_bottom - avatar_y : 0; 561 int avatar_height = avatar_visible ? avatar_bottom - avatar_y : 0;
562 562
563 gfx::Rect avatar_bounds(avatar_insets.left(), avatar_y, 563 gfx::Rect avatar_bounds(avatar_insets.left(), avatar_y,
564 incognito_icon.width(), avatar_height); 564 incognito_icon.width(), avatar_height);
565 avatar_button()->SetBoundsRect(avatar_bounds); 565 avatar_button()->SetBoundsRect(avatar_bounds);
566 avatar_button()->SetVisible(avatar_visible); 566 avatar_button()->SetVisible(avatar_visible);
567 } 567 }
568 568
569 #if defined(FRAME_AVATAR_BUTTON) 569 #if defined(FRAME_AVATAR_BUTTON)
570 void BrowserNonClientFrameViewAsh::LayoutNewStyleAvatar() { 570 void BrowserNonClientFrameViewAsh::LayoutNewStyleAvatar() {
571 DCHECK(switches::IsNewAvatarMenu()); 571 DCHECK(new_avatar_button());
572 572
573 gfx::Size button_size = new_avatar_button()->GetPreferredSize(); 573 gfx::Size button_size = new_avatar_button()->GetPreferredSize();
574 int button_x = width() - 574 int button_x = width() -
575 caption_button_container_->GetPreferredSize().width() - 575 caption_button_container_->GetPreferredSize().width() -
576 kNewAvatarButtonOffset - button_size.width(); 576 kNewAvatarButtonOffset - button_size.width();
577 577
578 new_avatar_button()->SetBounds( 578 new_avatar_button()->SetBounds(
579 button_x, 579 button_x,
580 0, 580 0,
581 button_size.width(), 581 button_size.width(),
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 } 703 }
704 } 704 }
705 705
706 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) { 706 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) {
707 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()); 707 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle());
708 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), 708 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(),
709 width(), kClientEdgeThickness), 709 width(), kClientEdgeThickness),
710 ThemeProperties::GetDefaultColor( 710 ThemeProperties::GetDefaultColor(
711 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); 711 ThemeProperties::COLOR_TOOLBAR_SEPARATOR));
712 } 712 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698