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

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

Issue 8110003: Show avatar menu from NTP4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
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 af78b51df6919bbcff7446c3ffaf0c1262719b17..fa08f2dcef60735c118c2aeb1840516a6b935818 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -575,3 +575,17 @@ void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) {
[controller_ updateSidebarForContents:tab_contents];
}
}
+
+void BrowserWindowCocoa::ShowAvatarBubble(TabContents* tab_contents,
+ int x, int y) {
+ NSView* view = tab_contents->GetNativeView();
+ NSPoint point = NSMakePoint(x, y);
+ 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];
+}

Powered by Google App Engine
This is Rietveld 408576698