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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 7277089: Display a tooltip when mouse hovers over a folder in the bookmark bar. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 5 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/views/bookmarks/bookmark_bar_view.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/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)
@@ -195,6 +195,15 @@
}
}
+ bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
Alexei Svitkine (slow) 2011/07/07 19:58:56 Please use virtual and OVERRIDE here (like |IsTrig
PhilBeaudoin 2011/07/07 20:26:17 Done.
+ gfx::Point location(p);
sky 2011/07/07 20:07:16 It doesn't look 199 and 200 are needed.
PhilBeaudoin 2011/07/07 20:26:17 Done.
+ ConvertPointToScreen(this, &location);
+ if (text_size_.width() > GetTextBounds().width()) {
sky 2011/07/07 20:07:16 no {}
PhilBeaudoin 2011/07/07 20:26:17 Done.
+ *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.
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698