Chromium Code Reviews| Index: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm |
| index 3746bf4223434a3d1158981183746b988977583a..93454b2eb1907dfeb29d0809b08e53275982c18c 100644 |
| --- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm |
| +++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm |
| @@ -65,6 +65,8 @@ |
| const CGFloat kBubbleMinWidth = 315.0f; |
| const NSSize kPermissionIconSize = {18, 18}; |
| +const NSInteger kFullscreenLeftMargin = 40; |
| + |
| } // namespace |
| // NSPopUpButton with a menu containing two items: allow and block. |
| @@ -256,9 +258,11 @@ + (NSPoint)getAnchorPointForBrowser:(Browser*)browser { |
| [[parentWindow windowController] locationBarBridge]; |
| anchor = location_bar->GetPageInfoBubblePoint(); |
| } else { |
| - // Center the bubble if there's no location bar. |
| + // Position the bubble on the left of the screen if there is no page info |
| + // button to point at. |
| NSRect contentFrame = [[parentWindow contentView] frame]; |
| - anchor = NSMakePoint(NSMidX(contentFrame), NSMaxY(contentFrame)); |
| + anchor = NSMakePoint(NSMinX(contentFrame) + kFullscreenLeftMargin, |
| + NSMaxY(contentFrame)); |
| } |
| return ui::ConvertPointFromWindowToScreen(parentWindow, anchor); |
| @@ -484,8 +488,7 @@ - (bool)hasVisibleLocationBar { |
| } |
| - (info_bubble::BubbleArrowLocation)getExpectedArrowLocation { |
| - return [self hasVisibleLocationBar] ? info_bubble::kTopLeft |
| - : info_bubble::kNoArrow; |
| + return info_bubble::kTopLeft; |
|
tapted
2016/08/11 23:51:20
does this mean that there will be an arrow in full
benwells
2016/08/12 04:13:43
Yep, that's what it means. This matches the views
|
| } |
| - (NSWindow*)getExpectedParentWindow { |