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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.cc

Issue 2555623002: Last round of cleaning up MD layout constants. (Closed)
Patch Set: pkasting review, remove debug code, rebase Created 4 years 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
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc ('k') | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_result_view.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
index 2a1fc5309e6f881a7c84dcd6ead9b849131af99a..fa8546b2a3bc2085ffa7ee17df23aee16f2064b0 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -20,7 +20,6 @@
#include "base/i18n/bidi_line_iterator.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
-#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h"
@@ -590,20 +589,21 @@ void OmniboxResultView::InitContentsRenderTextIfNecessary() const {
}
void OmniboxResultView::Layout() {
- int horizontal_padding =
- GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING);
+ constexpr int horizontal_padding = LocationBarView::kHorizontalPadding;
// The horizontal bounds we're given are the outside bounds, so we can match
// the omnibox border outline shape exactly in OnPaint(). We have to inset
// here to keep the icons lined up.
- const int start_x =
- GetLayoutConstant(LOCATION_BAR_BORDER_THICKNESS) + horizontal_padding;
+ constexpr int start_x =
+ BackgroundWith1PxBorder::kLocationBarBorderThicknessDip +
+ horizontal_padding;
const int end_x = width() - start_x;
const gfx::ImageSkia icon = GetIcon();
icon_bounds_.SetRect(start_x, (GetContentLineHeight() - icon.height()) / 2,
icon.width(), icon.height());
- const int text_x = start_x + LocationBarView::kIconWidth + horizontal_padding;
+ constexpr int text_x =
+ start_x + LocationBarView::kIconWidth + horizontal_padding;
int text_width = end_x - text_x;
if (match_.associated_keyword.get()) {
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc ('k') | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698