Index: chrome/browser/cocoa/location_bar/location_icon_decoration.mm |
diff --git a/chrome/browser/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/cocoa/location_bar/location_icon_decoration.mm |
index 9ec9794c7c92bf72fd2fd2c8eed77cb75c5230cb..f967af2e617d425d997d8d6c4a289f1bba15c0c4 100644 |
--- a/chrome/browser/cocoa/location_bar/location_icon_decoration.mm |
+++ b/chrome/browser/cocoa/location_bar/location_icon_decoration.mm |
@@ -11,6 +11,12 @@ |
#include "chrome/browser/tab_contents/tab_contents.h" |
#import "third_party/mozilla/NSPasteboard+Utils.h" |
+// The info-bubble point should look like it points to the point |
+// between the star's lower tips. The popup should be where the |
+// Omnibox popup ends up (2px below field). Determined via Pixie.app |
+// magnification. |
+const CGFloat kBubblePointYOffset = 2.0; |
+ |
LocationIconDecoration::LocationIconDecoration(LocationBarViewMac* owner) |
: owner_(owner) { |
} |
@@ -45,6 +51,12 @@ NSPasteboard* LocationIconDecoration::GetDragPasteboard() { |
return pboard; |
} |
+NSPoint LocationIconDecoration::GetBubblePointInFrame(NSRect frame) { |
+ const NSRect draw_frame = GetDrawRectInFrame(frame); |
+ return NSMakePoint(NSMidX(draw_frame), |
+ NSMaxY(draw_frame) - kBubblePointYOffset); |
+} |
+ |
bool LocationIconDecoration::OnMousePressed(NSRect frame) { |
// Do not show page info if the user has been editing the location |
// bar, or the location bar is at the NTP. |