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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 15932008: Add managed user avatar menu for mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test. Created 7 years, 6 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 | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index dd8d3ef07987792f4cf9109cfaad2f5183b15b93..fe29d7ba16a0c13a7b5993396d73b933bdfa9b04 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -342,7 +342,7 @@ willPositionSheet:(NSWindow*)sheet
NSView* avatarButton = [avatarButtonController_ view];
CGFloat buttonHeight = std::min(
static_cast<CGFloat>(profiles::kAvatarIconHeight), tabStripHeight);
- [avatarButton setFrameSize:NSMakeSize(profiles::kAvatarIconWidth,
+ [avatarButton setFrameSize:NSMakeSize(NSWidth([avatarButton frame]),
buttonHeight)];
// Actually place the badge *above* |maxY|, by +2 to miss the divider.
@@ -367,6 +367,10 @@ willPositionSheet:(NSWindow*)sheet
rightIndent += -[window fullScreenButtonOriginAdjustment].x;
} else if ([self shouldShowAvatar]) {
rightIndent += kAvatarTabStripShrink;
+ if ([avatarButtonController_ labelView]) {
+ rightIndent += NSWidth([[avatarButtonController_ labelView] frame]) +
+ kAvatarRightOffset;
+ }
}
[tabStripController_ setRightIndentForControls:rightIndent];
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698