Commit 7409c04c authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Mac: Remove Cocoa-dialog path in Cocoa app menu anchoring code

Bug: 877493
Change-Id: Iba8ba4941c2751fc6a77edc258e066cfc8ecb5ca
Reviewed-on: https://chromium-review.googlesource.com/1191248
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586690}
parent 18154b98
......@@ -24,11 +24,6 @@ class RecentTabsMenuModelDelegate;
@class AppMenuButtonViewController;
class AppMenuModel;
namespace app_menu_controller {
// The vertical offset of the app menu bubbles from the app menu button.
extern const CGFloat kAppMenuBubblePointOffsetY;
}
namespace AppMenuControllerInternal {
class AcceleratorDelegate;
class ToolbarActionsBarObserverHelper;
......
......@@ -57,10 +57,6 @@ const int kRightPadding = 10;
const int kMaxOverflowContainerHeight = 416;
}
namespace app_menu_controller {
const CGFloat kAppMenuBubblePointOffsetY = 6;
}
using base::UserMetricsAction;
@interface AppMenuController (Private)
......
......@@ -29,7 +29,6 @@
#include "chrome/browser/ui/browser_window.h"
#import "chrome/browser/ui/cocoa/app_menu/app_menu_controller.h"
#import "chrome/browser/ui/cocoa/background_gradient_view.h"
#include "chrome/browser/ui/cocoa/browser_dialogs_views_mac.h"
#include "chrome/browser/ui/cocoa/drag_util.h"
#import "chrome/browser/ui/cocoa/extensions/browser_action_button.h"
#import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h"
......@@ -983,16 +982,7 @@ class NotificationBridge : public AppMenuIconController::Delegate {
- (NSPoint)appMenuBubblePoint {
NSRect frame = appMenuButton_.frame;
NSPoint point;
if (chrome::ShowAllDialogsWithViewsToolkit()) {
// Use the bottom right for MD-style anchoring (no arrow).
point = NSMakePoint(NSMaxX(frame), NSMinY(frame));
} else {
// Grab bottom middle of hotdogs.
point = NSMakePoint(NSMidX(frame), NSMinY(frame));
// Inset to account for the whitespace around the hotdogs.
point.y += app_menu_controller::kAppMenuBubblePointOffsetY;
}
NSPoint point = NSMakePoint(NSMaxX(frame), NSMinY(frame));
return [self.view convertPoint:point toView:nil];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment