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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc

Issue 2152243002: [Autofill] Tweak credit card signin promo visually. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no curlies Created 4 years, 5 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
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..e1bbe01bda9988c8b61d0f68ac5b94dd882530dd 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;
+ if (suggestions_[index].frontend_id ==
+ POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) {
+ return kPromoPopupBackground;
+ }
+
+ return SK_ColorTRANSPARENT;
+}
+
int AutofillPopupControllerImpl::selected_line() const {
return selected_line_;
}
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_impl.h ('k') | chrome/browser/ui/autofill/popup_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698