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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_bubble_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_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.mm b/chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.mm
index 017489576a6190a13f9412d9598868562d06ecf5..1a26bdce55fedb4bd2f3309a49f58cfd79a41cb1 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.mm
@@ -5,7 +5,6 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
-#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#include "skia/ext/skia_utils_mac.h"
@@ -26,12 +25,14 @@ const CGFloat kMaxLabelWidth =
message:(NSString*)message {
return [self initWithParentWindow:parentWindow
message:message
- inset:NSMakeSize(kLabelInset, kLabelInset)];
+ inset:NSMakeSize(kLabelInset, kLabelInset)
+ arrowLocation:info_bubble::kTopCenter];
}
- (id)initWithParentWindow:(NSWindow*)parentWindow
message:(NSString*)message
- inset:(NSSize)inset {
+ inset:(NSSize)inset
+ arrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation {
base::scoped_nsobject<InfoBubbleWindow> window(
[[InfoBubbleWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 100)
styleMask:NSBorderlessWindowMask
@@ -43,7 +44,7 @@ const CGFloat kMaxLabelWidth =
anchoredAt:NSZeroPoint])) {
inset_ = inset;
[self setShouldOpenAsKeyWindow:NO];
- [[self bubble] setArrowLocation:info_bubble::kTopCenter];
+ [[self bubble] setArrowLocation:arrowLocation];
[[self bubble] setAlignment:info_bubble::kAlignArrowToAnchor];
label_.reset([[NSTextField alloc] init]);

Powered by Google App Engine
This is Rietveld 408576698