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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.mm

Issue 113763002: [rAc] [OSX] Set tooltip bubble arrow's anchor point based on the icon location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.mm b/chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.mm
index 668e65606da09d80a81e92e1369b34199d657067..9850b71575496b9588e850faf4709e7662a3398e 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.mm
@@ -66,8 +66,9 @@ CGFloat kTooltipInset = 10;
@synthesize message = message_;
-- (id)init {
+- (id)initWithArrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation {
if ((self = [super init])) {
+ arrowLocation_ = arrowLocation;
view_.reset([[AutofillTooltip alloc] init]);
[self setView:view_];
[view_ setTooltipDelegate:self];
@@ -108,7 +109,8 @@ CGFloat kTooltipInset = 10;
[[AutofillBubbleController alloc]
initWithParentWindow:[[self view] window]
message:[self message]
- inset:NSMakeSize(kTooltipInset, kTooltipInset)];
+ inset:NSMakeSize(kTooltipInset, kTooltipInset)
+ arrowLocation:arrowLocation_];
// Handle bubble self-deleting.
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];

Powered by Google App Engine
This is Rietveld 408576698