| Index: chrome/browser/ui/cocoa/profile_menu_button.mm
|
| diff --git a/chrome/browser/ui/cocoa/profile_menu_button.mm b/chrome/browser/ui/cocoa/profile_menu_button.mm
|
| index 866bb40ffd0275df35930abc823874ea9c2e9701..aeb1bd9f556e724305b5a8342ab34ebfe2b2949b 100644
|
| --- a/chrome/browser/ui/cocoa/profile_menu_button.mm
|
| +++ b/chrome/browser/ui/cocoa/profile_menu_button.mm
|
| @@ -7,6 +7,7 @@
|
| #include <algorithm>
|
|
|
| #include "base/logging.h"
|
| +#include "chrome/browser/ui/profile_menu_model.h"
|
| #import "third_party/GTM/AppKit/GTMFadeTruncatingTextFieldCell.h"
|
|
|
| namespace {
|
| @@ -52,6 +53,10 @@ NSColor* GetBlackWithAlpha(CGFloat alpha) {
|
| [textFieldCell_ setAlignment:NSRightTextAlignment];
|
| [textFieldCell_ setFont:[NSFont systemFontOfSize:
|
| [NSFont smallSystemFontSize]]];
|
| +
|
| + profile_menu_model_.reset(new ProfileMenuModel);
|
| + menu_.reset([[MenuController alloc] initWithModel:profile_menu_model_.get()
|
| + useWithPopUpButtonCell:NO]);
|
| }
|
|
|
| - (id)initWithFrame:(NSRect)frame
|
| @@ -326,6 +331,10 @@ NSColor* GetBlackWithAlpha(CGFloat alpha) {
|
| }
|
| }
|
|
|
| +- (NSMenu *)menu {
|
| + return [menu_.get() menu];
|
| +}
|
| +
|
| - (NSPoint)popUpMenuPosition {
|
| NSPoint menuPos = [self tabRect].origin;
|
| // By default popUpContextMenu: causes the menu to show up a few pixels above
|
|
|