Index: chrome/browser/ui/views/location_bar/ev_bubble_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/ev_bubble_view.cc b/chrome/browser/ui/views/location_bar/ev_bubble_view.cc |
index 5d651be560790a3debea00dd766281148e312982..e50f621d23e6afb834c19ee03ac78eafe5f3c54a 100644 |
--- a/chrome/browser/ui/views/location_bar/ev_bubble_view.cc |
+++ b/chrome/browser/ui/views/location_bar/ev_bubble_view.cc |
@@ -4,6 +4,13 @@ |
#include "chrome/browser/ui/views/location_bar/ev_bubble_view.h" |
+namespace { |
+ |
+// Set a minimum size for elided EV bubbles 150 px. |
Peter Kasting
2012/12/21 19:17:01
Nit: Grammar
beaudoin
2013/01/03 03:30:45
Done.
|
+static const int kMinBubbleWidth = 150; |
Peter Kasting
2012/12/21 19:17:01
Nit: Just declare this in the function where you u
beaudoin
2013/01/03 03:30:45
Done.
|
+ |
+} // namespace |
+ |
EVBubbleView::EVBubbleView(const int background_images[], |
int contained_image, |
SkColor color, |
@@ -16,6 +23,12 @@ EVBubbleView::EVBubbleView(const int background_images[], |
EVBubbleView::~EVBubbleView() { |
} |
+gfx::Size EVBubbleView::GetMinimumSize() { |
+ gfx::Size minimum(GetPreferredSize()); |
+ minimum.set_width(std::min(kMinBubbleWidth, minimum.width())); |
+ return minimum; |
+} |
+ |
bool EVBubbleView::OnMousePressed(const ui::MouseEvent& event) { |
// We want to show the dialog on mouse release; that is the standard behavior |
// for buttons. |