Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
=================================================================== |
--- chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc (revision 91698) |
+++ chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc (working copy) |
@@ -146,7 +146,8 @@ |
} |
} |
- bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip) { |
+ virtual bool GetTooltipText(const gfx::Point& p, |
+ std::wstring* tooltip) OVERRIDE { |
gfx::Point location(p); |
ConvertPointToScreen(this, &location); |
*tooltip = BookmarkBarView::CreateToolTipForURLAndTitle(location, url_, |
@@ -195,6 +196,13 @@ |
} |
} |
+ virtual bool GetTooltipText(const gfx::Point& p, |
+ std::wstring* tooltip) OVERRIDE { |
+ if (text_size_.width() > GetTextBounds().width()) |
+ *tooltip = text_; |
+ return !tooltip->empty(); |
+ } |
+ |
virtual bool IsTriggerableEvent(const views::MouseEvent& e) OVERRIDE { |
// Left clicks should show the menu contents and right clicks should show |
// the context menu. They should not trigger the opening of underlying urls. |