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

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: addressed round2 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..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_;
}
« 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