Index: chrome/browser/ui/cocoa/base_bubble_controller.mm |
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm |
index 2b20e209bdeb00bc2747cf986e8125c762c65088..2555f8839995c7ad1476c954e485b9de187a32af 100644 |
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm |
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm |
@@ -251,10 +251,19 @@ |
NSSize offsets = NSMakeSize(info_bubble::kBubbleArrowXOffset + |
info_bubble::kBubbleArrowWidth / 2.0, 0); |
offsets = [[parentWindow_ contentView] convertSize:offsets toView:nil]; |
- if ([bubble_ arrowLocation] == info_bubble::kTopRight) { |
- origin.x -= NSWidth([window frame]) - offsets.width; |
- } else { |
- origin.x -= offsets.width; |
+ switch ([bubble_ arrowLocation]) { |
+ case info_bubble::kTopRight: |
+ origin.x -= NSWidth([window frame]) - offsets.width; |
+ break; |
+ case info_bubble::kTopLeft: |
+ origin.x -= offsets.width; |
+ break; |
+ case info_bubble::kTopCenter: |
+ origin.x -= NSWidth([window frame]) / 2.0; |
+ break; |
+ case info_bubble::kNoArrow: |
+ NOTREACHED(); |
+ break; |
} |
break; |
} |