Chromium Code Reviews| Index: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| index 2922e94325da96bb636dd8750d61cfda6907f0b6..f701b66b88319a278d6646dc2e3d9fe00f1adc81 100644 |
| --- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| +++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| @@ -13,6 +13,7 @@ |
| #include "base/strings/utf_string_conversions.h" |
| #include "build/build_config.h" |
| #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
| +#include "chrome/browser/ui/autofill/popup_constants.h" |
| #include "components/autofill/core/browser/autofill_popup_delegate.h" |
| #include "components/autofill/core/browser/popup_item_ids.h" |
| #include "components/autofill/core/browser/suggestion.h" |
| @@ -408,8 +409,9 @@ const gfx::FontList& AutofillPopupControllerImpl::GetValueFontListForRow( |
| case POPUP_ITEM_ID_AUTOFILL_OPTIONS: |
| case POPUP_ITEM_ID_SCAN_CREDIT_CARD: |
| case POPUP_ITEM_ID_SEPARATOR: |
| - case POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO: |
| return normal_font_list_; |
| + case POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO: |
| + return smaller_font_list_; |
| case POPUP_ITEM_ID_TITLE: |
| case POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY: |
| case POPUP_ITEM_ID_DATALIST_ENTRY: |
| @@ -425,6 +427,17 @@ const gfx::FontList& AutofillPopupControllerImpl::GetLabelFontList() const { |
| } |
| #endif |
| +SkColor AutofillPopupControllerImpl::GetBackgroundColorForRow(int index) const { |
| + if (index == selected_line_) { |
| + return kHoveredBackgroundColor; |
| + } else if (suggestions_[index].frontend_id == |
|
Evan Stade
2016/07/18 17:52:56
nit: no else after return
Mathieu
2016/07/18 18:01:41
Done.
|
| + POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) { |
| + return kPromoPopupBackground; |
| + } |
| + |
| + return SK_ColorWHITE; |
|
Evan Stade
2016/07/18 17:52:56
this is redundant with kPopupBackground. You shoul
Mathieu
2016/07/18 18:01:41
Done.
|
| +} |
| + |
| int AutofillPopupControllerImpl::selected_line() const { |
| return selected_line_; |
| } |