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

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc

Issue 271013002: Compute minimum widths for the toolbar components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/ui/views/location_bar/icon_label_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
index 9a14d78d4b754610b0128dd57b1853358a546f84..875e00fc8622289a62856b3268495dd89f7449d0 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -100,6 +100,12 @@ gfx::Size IconLabelBubbleView::GetSizeForLabelWidth(int width) const {
return size;
}
+gfx::Size IconLabelBubbleView::GetSizeForLabelText(
+ const base::string16& text) const {
+ views::Label label(text, label_->font_list());
+ return GetSizeForLabelWidth(label.GetPreferredSize().width());
+}
+
void IconLabelBubbleView::OnMouseEntered(const ui::MouseEvent& event) {
in_hover_ = true;
if (hover_background_painter_.get())

Powered by Google App Engine
This is Rietveld 408576698