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

Unified Diff: chrome/browser/cocoa/location_bar/location_icon_decoration.mm

Issue 3461016: [Mac] Convert the page info window to a bubble. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Address nits Created 10 years, 3 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/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.
« no previous file with comments | « chrome/browser/cocoa/location_bar/location_icon_decoration.h ('k') | chrome/browser/cocoa/page_info_bubble_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698