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

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

Issue 1162393003: Replace info_bubble::BubbleArrowLocation with views::BubbleBorder::Arrow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile in test Created 5 years, 7 months 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/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 17516253c1f3a835d3d76331071791d6c6e5be7b..b6862dc43da443787835740415437381dacf8f0f 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -106,7 +106,7 @@
self));
}
- [bubble_ setArrowLocation:info_bubble::kTopRight];
+ [bubble_ setArrowLocation:views::BubbleBorder::TOP_RIGHT];
}
- (void)dealloc {
@@ -334,17 +334,20 @@
info_bubble::kBubbleArrowWidth / 2.0, 0);
offsets = [[parentWindow_ contentView] convertSize:offsets toView:nil];
switch ([bubble_ arrowLocation]) {
- case info_bubble::kTopRight:
+ case views::BubbleBorder::TOP_RIGHT:
origin.x -= NSWidth([window frame]) - offsets.width;
break;
- case info_bubble::kTopLeft:
+ case views::BubbleBorder::TOP_LEFT:
origin.x -= offsets.width;
break;
- case info_bubble::kNoArrow:
+ case views::BubbleBorder::NONE:
// FALLTHROUGH.
- case info_bubble::kTopCenter:
+ case views::BubbleBorder::TOP_CENTER:
origin.x -= NSWidth([window frame]) / 2.0;
break;
+ default:
+ // Mac bubbles currently don't use other enums.
+ NOTREACHED();
}
break;
}
@@ -354,7 +357,7 @@
// edge aligns with the anchor. If the arrow is to the left then there's
// nothing to do because the left edge is already aligned with the left
// edge of the anchor.
- if ([bubble_ arrowLocation] == info_bubble::kTopRight) {
+ if ([bubble_ arrowLocation] == views::BubbleBorder::TOP_RIGHT) {
origin.x -= NSWidth([window frame]);
}
break;

Powered by Google App Engine
This is Rietveld 408576698