Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| index 5e588a8186f4fa94e36b350c88698c78198f9583..7269747e297797c958c44a05cb9242c33b1177d5 100644 |
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| @@ -486,12 +486,16 @@ void LocationBarView::Layout() { |
| // hits ctrl-d). |
| const int vertical_padding = GetTotalVerticalPadding(); |
| const int location_height = std::max(height() - (vertical_padding * 2), 0); |
| + // The largest fraction of the omnibox that can be taken by the EV or search |
| + // label/chip. |
| + const double kMaxBubbleFraction = 0.5; |
|
Peter Kasting
2017/03/07 02:28:45
Nit: Now that we've moved away from "bubble" prese
|
| location_icon_view_->SetLabel(base::string16()); |
| + |
| if (ShouldShowKeywordBubble()) { |
| - leading_decorations.AddDecoration(vertical_padding, location_height, true, |
| - 0, item_padding, item_padding, |
| - selected_keyword_view_); |
| + leading_decorations.AddDecoration(vertical_padding, location_height, false, |
| + kMaxBubbleFraction, item_padding, |
| + item_padding, selected_keyword_view_); |
| if (selected_keyword_view_->keyword() != keyword) { |
| selected_keyword_view_->SetKeyword(keyword); |
| const TemplateURL* template_url = |
| @@ -508,8 +512,6 @@ void LocationBarView::Layout() { |
| } |
| } else if (ShouldShowLocationIconText()) { |
| location_icon_view_->SetLabel(GetLocationIconText()); |
| - // The largest fraction of the omnibox that can be taken by the EV bubble. |
| - const double kMaxBubbleFraction = 0.5; |
|
Evan Stade
2017/03/07 01:20:14
I didn't even notice till just now this is the sam
Peter Kasting
2017/03/07 02:28:45
Honestly, we should probably apply these limits to
|
| leading_decorations.AddDecoration(vertical_padding, location_height, false, |
| kMaxBubbleFraction, item_padding, |
| item_padding, location_icon_view_); |