| 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..9bc85c2bfe696bb8aa4bc8a8b69477a3f9fb6801 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);
|
| +
|
| ~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, returning -1 if the dropdown item height
|
| + // isn't configured in an experiment to tweak autofill popup layout.
|
| + 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);
|
| };
|
|
|
|
|