Chromium Code Reviews| 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 0f05966cc2d791108017de0219cf87980dfe1a59..8bb584ecc664132214f0ca7238ad05ac1b16ce49 100644 |
| --- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
| +++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
| @@ -6,7 +6,6 @@ |
| #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/events/keycodes/keyboard_codes.h" |
| @@ -48,7 +47,8 @@ void AutofillPopupViewViews::OnPaint(gfx::Canvas* canvas) { |
| if (!controller_) |
| return; |
| - canvas->DrawColor(kPopupBackground); |
| + canvas->DrawColor(GetNativeTheme()->GetSystemColor( |
| + ui::NativeTheme::kColorId_ResultsTableNormalBackground)); |
| OnPaintBorder(canvas); |
| for (size_t i = 0; i < controller_->GetLineCount(); ++i) { |
| @@ -56,7 +56,10 @@ void AutofillPopupViewViews::OnPaint(gfx::Canvas* canvas) { |
| if (controller_->GetSuggestionAt(i).frontend_id == |
| POPUP_ITEM_ID_SEPARATOR) { |
| - canvas->FillRect(line_rect, kLabelTextColor); |
| + canvas->FillRect( |
| + line_rect, |
| + GetNativeTheme()->GetSystemColor( |
| + ui::NativeTheme::kColorId_ResultsTableNormalDimmedText)); |
| } else { |
| DrawAutofillEntry(canvas, i, line_rect); |
| } |
| @@ -92,7 +95,9 @@ void AutofillPopupViewViews::InvalidateRow(size_t row) { |
| void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas, |
| int index, |
| const gfx::Rect& entry_rect) { |
| - canvas->FillRect(entry_rect, controller_->GetBackgroundColorForRow(index)); |
| + canvas->FillRect(entry_rect, |
| + GetNativeTheme()->GetSystemColor( |
| + controller_->GetBackgroundColorForRow(index))); |
| const bool is_http_warning = |
| (controller_->GetSuggestionAt(index).frontend_id == |
| @@ -150,7 +155,8 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas, |
| canvas->DrawStringRectWithFlags( |
| controller_->GetElidedValueAt(index), |
| controller_->layout_model().GetValueFontListForRow(index), |
| - controller_->layout_model().GetValueFontColorForRow(index), |
| + GetNativeTheme()->GetSystemColor( |
| + controller_->layout_model().GetValueFontColorForRow(index)), |
| gfx::Rect(value_x_align_left, value_rect.y(), value_width, |
| value_rect.height()), |
| text_align); |
| @@ -172,7 +178,9 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas, |
| canvas->DrawStringRectWithFlags( |
| controller_->GetElidedLabelAt(index), |
| controller_->layout_model().GetLabelFontListForRow(index), |
| - kLabelTextColor, gfx::Rect(label_x_align_left, entry_rect.y(), |
| + GetNativeTheme()->GetSystemColor( |
|
Mathieu
2016/12/20 20:36:40
Should we have a TODO to have a GetLabelFontColorF
jiahuiguo
2017/01/03 19:37:52
Done, added TODO in https://crbug.com/678033
Mathieu
2017/01/04 13:51:48
Please reference in code as // TODO(crbug.com/6780
jiahuiguo
2017/01/05 19:21:20
Done.
|
| + ui::NativeTheme::kColorId_ResultsTableNormalDimmedText), |
| + gfx::Rect(label_x_align_left, entry_rect.y(), |
| label_width, entry_rect.height()), |
| text_align); |
| } |