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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 2636473003: [Mac] Update the Text Color for the Avatar Button (Closed)
Patch Set: Added comment Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/profiles/avatar_button_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 // If the browser is in incognito mode or has multi-profiles, install the image 1632 // If the browser is in incognito mode or has multi-profiles, install the image
1633 // view to decorate the window at the upper right. Use the same base y 1633 // view to decorate the window at the upper right. Use the same base y
1634 // coordinate as the tab strip. 1634 // coordinate as the tab strip.
1635 - (void)installAvatar { 1635 - (void)installAvatar {
1636 // Install the image into the badge view. Hide it for now; positioning and 1636 // Install the image into the badge view. Hide it for now; positioning and
1637 // sizing will be done by the layout code. The AvatarIcon will choose which 1637 // sizing will be done by the layout code. The AvatarIcon will choose which
1638 // image to display based on the browser. The AvatarButton will display 1638 // image to display based on the browser. The AvatarButton will display
1639 // the browser profile's name unless the browser is incognito. 1639 // the browser profile's name unless the browser is incognito.
1640 NSView* view; 1640 NSView* view;
1641 if ([self shouldUseNewAvatarButton]) { 1641 if ([self shouldUseNewAvatarButton]) {
1642 avatarButtonController_.reset( 1642 avatarButtonController_.reset([[AvatarButtonController alloc]
1643 [[AvatarButtonController alloc] initWithBrowser:browser_.get()]); 1643 initWithBrowser:browser_.get()
1644 window:[self window]]);
1644 } else { 1645 } else {
1645 avatarButtonController_.reset( 1646 avatarButtonController_.reset(
1646 [[AvatarIconController alloc] initWithBrowser:browser_.get()]); 1647 [[AvatarIconController alloc] initWithBrowser:browser_.get()]);
1647 } 1648 }
1648 view = [avatarButtonController_ view]; 1649 view = [avatarButtonController_ view];
1649 if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) 1650 if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
1650 [view setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin]; 1651 [view setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
1651 else 1652 else
1652 [view setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin]; 1653 [view setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
1653 [view setHidden:![self shouldShowAvatar]]; 1654 [view setHidden:![self shouldShowAvatar]];
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 2010
2010 - (NSRect)savedRegularWindowFrame { 2011 - (NSRect)savedRegularWindowFrame {
2011 return savedRegularWindowFrame_; 2012 return savedRegularWindowFrame_;
2012 } 2013 }
2013 2014
2014 - (BOOL)isFullscreenTransitionInProgress { 2015 - (BOOL)isFullscreenTransitionInProgress {
2015 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2016 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2016 } 2017 }
2017 2018
2018 @end // @implementation BrowserWindowController(WindowType) 2019 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/profiles/avatar_button_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698