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

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc

Issue 2152243002: [Autofill] Tweak credit card signin promo visually. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/views/autofill/autofill_popup_view_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
index 0e47429d67abc81e89cff00bcb1e6cac72cf32f0..063dbd69b4281a86a1e269b2becdfde0a50a596b 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
@@ -70,8 +70,12 @@ void AutofillPopupViewViews::InvalidateRow(size_t row) {
void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
int index,
const gfx::Rect& entry_rect) {
- if (controller_->selected_line() == index)
+ if (controller_->selected_line() == index) {
canvas->FillRect(entry_rect, kHoveredBackgroundColor);
+ } else if (controller_->GetSuggestionAt(index).frontend_id ==
+ POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) {
+ canvas->FillRect(entry_rect, kPromoPopupBackground);
Evan Stade 2016/07/15 17:27:08 can you move this color logic to the controller?
Mathieu 2016/07/15 19:30:20 Done.
Evan Stade 2016/07/15 19:33:38 it seems to still be here. Also I had intended for
Mathieu 2016/07/18 13:48:02 Sorry, moved the logic now.
+ }
const bool is_rtl = controller_->IsRTL();
const int text_align =

Powered by Google App Engine
This is Rietveld 408576698