| Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
|
| index aa2f8d3ee2e98a3edf8a51fb49839789c3bd1d4d..9d7105f03805054672072a8df7a2766481c1363d 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
|
| @@ -18,6 +18,7 @@
|
| #include "chrome/browser/sidebar/sidebar_manager.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| +#import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h"
|
| #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h"
|
| #import "chrome/browser/ui/cocoa/browser_window_controller.h"
|
| #import "chrome/browser/ui/cocoa/browser_window_utils.h"
|
| @@ -589,3 +590,17 @@ void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) {
|
| [controller_ updateSidebarForContents:tab_contents];
|
| }
|
| }
|
| +
|
| +void BrowserWindowCocoa::ShowAvatarBubble(TabContents* tab_contents,
|
| + const gfx::Rect& rect) {
|
| + NSView* view = tab_contents->GetNativeView();
|
| + NSPoint point = NSMakePoint(rect.right(), rect.bottom());
|
| + point = [view convertPoint:point toView:nil];
|
| + point = [[view window] convertBaseToScreen:point];
|
| +
|
| + // |menu| will automatically release itself on close.
|
| + AvatarMenuBubbleController* menu =
|
| + [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
|
| + anchoredAt:point];
|
| + [menu showWindow:nil];
|
| +}
|
|
|