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..d87684ef8e4c79392d2f1bb5cb0f17a7992cc8b5 100644 |
--- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
+++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
@@ -6,6 +6,7 @@ |
#include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
#include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" |
+#include "chrome/browser/ui/autofill/popup_constants.h" |
#include "components/autofill/core/browser/popup_item_ids.h" |
#include "components/autofill/core/browser/suggestion.h" |
#include "ui/base/resource/resource_bundle.h" |
@@ -56,7 +57,7 @@ void AutofillPopupViewViews::OnPaint(gfx::Canvas* canvas) { |
if (controller_->GetSuggestionAt(i).frontend_id == |
POPUP_ITEM_ID_SEPARATOR) { |
- canvas->FillRect(line_rect, kItemTextColor); |
+ canvas->FillRect(line_rect, kLabelTextColor); |
} else { |
DrawAutofillEntry(canvas, i, line_rect); |
} |
@@ -70,8 +71,9 @@ void AutofillPopupViewViews::InvalidateRow(size_t row) { |
void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas, |
int index, |
const gfx::Rect& entry_rect) { |
- if (controller_->selected_line() == index) |
- canvas->FillRect(entry_rect, kHoveredBackgroundColor); |
+ // Controller chooses the background color depending on the state of the row |
+ // at |index|. |
Evan Stade
2016/07/18 18:13:08
nit: comment is unnecessary
Mathieu
2016/07/18 18:45:13
Done.
|
+ canvas->FillRect(entry_rect, controller_->GetBackgroundColorForRow(index)); |
const bool is_rtl = controller_->IsRTL(); |
const int text_align = |
@@ -117,7 +119,7 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas, |
canvas->DrawStringRectWithFlags( |
controller_->GetElidedLabelAt(index), controller_->GetLabelFontList(), |
- kItemTextColor, |
+ kLabelTextColor, |
gfx::Rect(x_align_left, entry_rect.y(), label_width, entry_rect.height()), |
text_align); |
} |