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

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

Issue 2507743002: Update the bookmark tooltip text only when necessary (Closed)
Patch Set: Update the bookmark tooltip text only when necessary Created 4 years, 1 month 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/ui/views/bookmarks/bookmark_bar_view.h
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
index c210bc6c0f8c99d68ab174e9dc1bdf96c1078993..3d2984323e989037e9c7a1d9d5a1b126326e8fd2 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
@@ -44,6 +44,10 @@ namespace content {
class PageNavigator;
}
+namespace gfx {
+class FontList;
+}
+
namespace views {
class CustomButton;
class MenuButton;
@@ -142,15 +146,15 @@ class BookmarkBarView : public views::AccessiblePaneView,
void StopThrobbing(bool immediate);
// Returns the tooltip text for the specified url and title. The returned
- // text is clipped to fit within the bounds of the monitor. |context| is
- // used to determine which display::Screen is used to retrieve bounds.
+ // text is clipped to fit the |max_width|.
sky 2016/11/17 01:08:28 'the max_width' -> 'max_width'
oshima 2016/11/17 14:02:33 Done.
//
// Note that we adjust the direction of both the URL and the title based on
// the locale so that pure LTR strings are displayed properly in RTL locales.
- static base::string16 CreateToolTipForURLAndTitle(const views::Widget* widget,
- const gfx::Point& screen_loc,
- const GURL& url,
- const base::string16& title);
+ static base::string16 CreateToolTipForURLAndTitle(
+ int max_width,
+ const gfx::FontList& font_list,
+ const GURL& url,
+ const base::string16& title);
// Returns true if Bookmarks Bar is currently detached from the Toolbar.
bool IsDetached() const;

Powered by Google App Engine
This is Rietveld 408576698