Chromium Code Reviews| Index: chrome/browser/ui/autofill/autofill_popup_layout_model.h |
| diff --git a/chrome/browser/ui/autofill/autofill_popup_layout_model.h b/chrome/browser/ui/autofill/autofill_popup_layout_model.h |
| index 80ac564594b8c1ed3c92f97e2778684fabe08ef4..a1f18d79a02384b8250eb18f20568395dd806e3b 100644 |
| --- a/chrome/browser/ui/autofill/autofill_popup_layout_model.h |
| +++ b/chrome/browser/ui/autofill/autofill_popup_layout_model.h |
| @@ -30,7 +30,9 @@ namespace autofill { |
| // TODO(mathp): investigate moving ownership of this class to the view. |
| class AutofillPopupLayoutModel { |
| public: |
| - explicit AutofillPopupLayoutModel(AutofillPopupViewDelegate* delegate); |
| + AutofillPopupLayoutModel(AutofillPopupViewDelegate* delegate, |
| + bool is_credit_card_field); |
|
Mathieu
2016/12/01 21:59:47
nit: the name makes it seem like there is one layo
csashi
2016/12/02 05:15:29
Done.
|
| + |
| ~AutofillPopupLayoutModel(); |
| // The minimum amount of padding between the Autofill name and subtext, |
| @@ -86,6 +88,28 @@ class AutofillPopupLayoutModel { |
| // resource isn't recognized. |
| int GetIconResourceID(const base::string16& resource_name) const; |
| + // Returns whether |GetBackgroundColor, GetDividerColor| returns a custom |
| + // color configured in an experiment to tweak autofill popup layout. |
| + bool IsPopupLayoutExperimentEnabled() const; |
| + |
| + // Returns the background color for the autofill popup, or |
| + // |SK_ColorTRANSPARENT| if not in an experiment to tweak autofill popup |
| + // layout. |
| + SkColor GetBackgroundColor() const; |
| + |
| + // Returns the divider color for the autofill popup, or |
| + // |SK_ColorTRANSPARENT| if not in an experiment to tweak autofill popup |
| + // layout. |
| + SkColor GetDividerColor() const; |
| + |
| + // Returns the dropdown item height, or 0 if the dropdown item height isn't |
| + // configured in an experiment to tweak autofill popup layout. |
| + unsigned int GetDropdownItemHeight() const; |
| + |
| + // Returns true if suggestion icon must be displayed to left of suggestion |
| + // text. |
| + bool IsIconAtLeft() const; |
| + |
| private: |
| // Returns the enclosing rectangle for the element_bounds. |
| const gfx::Rect RoundedElementBounds() const; |
| @@ -110,6 +134,8 @@ class AutofillPopupLayoutModel { |
| AutofillPopupViewDelegate* delegate_; // Weak reference. |
| + const bool is_credit_card_field_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AutofillPopupLayoutModel); |
| }; |