| 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 b3a2c735fbaf8a0531c8465a949cd677d6608700..6e310779b027d4ebb874495406058bb0345564a0 100644
|
| --- a/chrome/browser/ui/autofill/autofill_popup_layout_model.h
|
| +++ b/chrome/browser/ui/autofill/autofill_popup_layout_model.h
|
| @@ -25,7 +25,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_popup);
|
| +
|
| ~AutofillPopupLayoutModel();
|
|
|
| // The minimum amount of padding between the Autofill name and subtext,
|
| @@ -92,6 +94,27 @@ 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 before suggestion text.
|
| + bool IsIconAtStart(int frontend_id) const;
|
| +
|
| private:
|
| // Returns the enclosing rectangle for the element_bounds.
|
| const gfx::Rect RoundedElementBounds() const;
|
| @@ -116,6 +139,8 @@ class AutofillPopupLayoutModel {
|
|
|
| AutofillPopupViewDelegate* delegate_; // Weak reference.
|
|
|
| + const bool is_credit_card_popup_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AutofillPopupLayoutModel);
|
| };
|
|
|
|
|