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

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: rebase 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 485ebb18260378ec168646d5fd08dba0d31c2709..8c388b1aa25645ad5f03256ca10c667ddd008f2f 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -89,20 +89,6 @@ const int kBookmarkAppBubbleViewHeight = 46;
const int kIconPreviewTargetSize = 64;
-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,
@@ -778,18 +764,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) {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698