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

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

Issue 2854263002: Omnibox UI Experiments: Add vertical margin variations to about:flags (Closed)
Patch Set: update histograms Created 3 years, 7 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/flag_descriptions.cc ('k') | components/omnibox/browser/omnibox_field_trial.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 b3958c5119cc270add39a2389379bb79f875fffa..87902bb5f48a65fae90d1cdadc908cd4206cfee3 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -18,6 +18,7 @@
#include <algorithm> // NOLINT
#include "base/i18n/bidi_line_iterator.h"
+#include "base/metrics/field_trial_params.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "chrome/browser/ui/layout_constants.h"
@@ -26,6 +27,7 @@
#include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h"
#include "chrome/grit/generated_resources.h"
#include "components/grit/components_scaled_resources.h"
+#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/browser/omnibox_popup_model.h"
#include "components/omnibox/browser/vector_icons.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -724,7 +726,10 @@ int OmniboxResultView::GetVerticalMargin() const {
// here. This minimum is larger for hybrid mouse/touch devices to ensure an
// adequately sized touch target.
using Md = ui::MaterialDesignController;
- const int kIconVerticalPad = Md::GetMode() == Md::MATERIAL_HYBRID ? 8 : 4;
+ const int kIconVerticalPad = base::GetFieldTrialParamByFeatureAsInt(
+ omnibox::kUIExperiments,
+ OmniboxFieldTrial::kUIExperimentsVerticalMarginParam,
+ Md::GetMode() == Md::MATERIAL_HYBRID ? 8 : 4);
const int min_height = LocationBarView::kIconWidth + 2 * kIconVerticalPad;
return std::max(kVerticalPadding, (min_height - GetTextHeight()) / 2);
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | components/omnibox/browser/omnibox_field_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698