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

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

Issue 2444923003: Some more pre-material cleanups (Closed)
Patch Set: pkasting review Created 4 years, 2 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/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 288af689f25eb670b606e7e782470f346905713a..a953ccd8475184ad8a99f2d67364f11573dafa7c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -515,7 +515,6 @@ gfx::Size LocationBarView::GetPreferredSize() const {
} else if (ShouldShowSecurityChip()) {
base::string16 security_text = GetSecurityText();
leading_width +=
- GetLayoutConstant(LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING) +
location_icon_view_->GetMinimumSizeForLabelText(security_text).width();
} else {
leading_width += padding + location_icon_view_->GetMinimumSize().width();
@@ -565,16 +564,14 @@ void LocationBarView::Layout() {
// to position our child views in this case, because other things may be
// positioned relative to them (e.g. the "bookmark added" bubble if the user
// hits ctrl-d).
- const int bubble_horizontal_padding =
- GetLayoutConstant(LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING);
const int vertical_padding = GetTotalVerticalPadding();
const int location_height = std::max(height() - (vertical_padding * 2), 0);
location_icon_view_->SetLabel(base::string16());
if (ShouldShowKeywordBubble()) {
leading_decorations.AddDecoration(vertical_padding, location_height, true,
- 0, bubble_horizontal_padding,
- item_padding, selected_keyword_view_);
+ 0, 0, item_padding,
+ selected_keyword_view_);
if (selected_keyword_view_->keyword() != keyword) {
selected_keyword_view_->SetKeyword(keyword);
const TemplateURL* template_url =
@@ -593,9 +590,9 @@ void LocationBarView::Layout() {
location_icon_view_->SetLabel(GetSecurityText());
// The largest fraction of the omnibox that can be taken by the EV bubble.
const double kMaxBubbleFraction = 0.5;
- leading_decorations.AddDecoration(
- vertical_padding, location_height, false, kMaxBubbleFraction,
- bubble_horizontal_padding, item_padding, location_icon_view_);
+ leading_decorations.AddDecoration(vertical_padding, location_height, false,
+ kMaxBubbleFraction, 0, item_padding,
+ location_icon_view_);
} else {
leading_decorations.AddDecoration(vertical_padding, location_height,
location_icon_view_);
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698