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

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

Issue 6543003: cocoa: Do not show up a tooltip when hovering on the magnifying glass on NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove comment Created 9 years, 10 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
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index efe812867463e6938e672459ddfcdec1c2372f3f..c7892a8a1bed859aee38dfde8ee8ada4ee6dffd3 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -19,8 +19,6 @@ const CGFloat kBubblePointYOffset = 2.0;
LocationIconDecoration::LocationIconDecoration(LocationBarViewMac* owner)
: owner_(owner) {
- tooltip_.reset(
- [l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON) retain]);
}
LocationIconDecoration::~LocationIconDecoration() {
@@ -77,5 +75,8 @@ bool LocationIconDecoration::OnMousePressed(NSRect frame) {
}
NSString* LocationIconDecoration::GetToolTip() {
- return tooltip_.get();
+ if (owner_->location_entry()->IsEditingOrEmpty())
+ return nil;
+ else
+ return l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON);
}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698