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

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

Issue 1000163005: [AiS] using const for vertical padding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_result_view.h ('k') | no next file » | 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 e6f67e2adc2cfc82516f86d75f0553b173b42485..2066cc154244ca98f3ff5676cba83d8b6523b1f0 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -40,6 +40,10 @@ using ui::NativeTheme;
namespace {
+// The minimum distance between the top and bottom of the icon and the
+// top or bottom of the row.
+const int kMinimumIconVerticalPadding = 2;
+
// Calls back to the OmniboxResultView when the requested image is downloaded.
// This is a separate class instead of being implemented on OmniboxResultView
// because BitmapFetcherService currently takes ownership of this object.
@@ -68,11 +72,6 @@ void AnswerImageObserver::OnImageChanged(
view_->SetAnswerImage(gfx::ImageSkia::CreateFrom1xBitmap(image));
}
-// The minimum distance between the top and bottom of the {icon|text} and the
-// top or bottom of the row.
-const int kMinimumIconVerticalPadding = 2;
-const int kMinimumTextVerticalPadding = 3;
-
// A mapping from OmniboxResultView's ResultViewState/ColorKind types to
// NativeTheme colors.
struct TranslationTable {
@@ -159,7 +158,6 @@ OmniboxResultView::OmniboxResultView(OmniboxPopupContentsView* model,
const gfx::FontList& font_list)
: edge_item_padding_(LocationBarView::kItemPadding),
item_padding_(LocationBarView::kItemPadding),
- minimum_text_vertical_padding_(kMinimumTextVerticalPadding),
model_(model),
model_index_(model_index),
location_bar_view_(location_bar_view),
@@ -252,7 +250,7 @@ void OmniboxResultView::Invalidate() {
gfx::Size OmniboxResultView::GetPreferredSize() const {
return gfx::Size(0, std::max(
default_icon_size_ + (kMinimumIconVerticalPadding * 2),
- GetTextHeight() + (minimum_text_vertical_padding_ * 2)));
+ GetTextHeight() + (kMinimumTextVerticalPadding * 2)));
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_result_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698