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

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

Issue 776423002: The Apps ntp page should not display an avatar menu when clicking on the username. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 b694868a3cd9c436f6fd54d6f0bf813ef2bc6157..b54e6b98c9151448fc2a211fd99ba0cf13b700d4 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -66,24 +66,6 @@ using content::NativeWebKeyboardEvent;
using content::SSLStatus;
using content::WebContents;
-namespace {
-
-NSPoint GetPointForBubble(content::WebContents* web_contents,
- int x_offset,
- int y_offset) {
- NSView* view = web_contents->GetNativeView();
- NSRect bounds = [view bounds];
- NSPoint point;
- point.x = NSMinX(bounds) + x_offset;
- // The view's origin is at the bottom but |rect|'s origin is at the top.
- point.y = NSMaxY(bounds) - y_offset;
- point = [view convertPoint:point toView:nil];
- point = [[view window] convertBaseToScreen:point];
- return point;
-}
-
-} // namespace
-
BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser,
BrowserWindowController* controller)
: browser_(browser),
@@ -677,18 +659,6 @@ NSWindow* BrowserWindowCocoa::window() const {
return [controller_ window];
}
-void BrowserWindowCocoa::ShowAvatarBubble(WebContents* web_contents,
- const gfx::Rect& rect) {
- NSPoint point = GetPointForBubble(web_contents, rect.right(), rect.bottom());
-
- // |menu| will automatically release itself on close.
- AvatarMenuBubbleController* menu =
- [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
- anchoredAt:point];
- [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
- [menu showWindow:nil];
-}
-
void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton(
AvatarBubbleMode mode,
const signin::ManageAccountsParams& manage_accounts_params) {

Powered by Google App Engine
This is Rietveld 408576698