Chromium Code Reviews| 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 cdf963fd316b1e7ef83a959e569b8d55b85489d2..c896e86f17dd4ddd293e9df8e442575e97f8e5d9 100644 |
| --- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| +++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| @@ -288,7 +288,9 @@ void AutofillPopupControllerImpl::AcceptSuggestion(size_t index) { |
| } |
| bool AutofillPopupControllerImpl::IsWarning(size_t index) const { |
| - return suggestions_[index].frontend_id == POPUP_ITEM_ID_WARNING_MESSAGE; |
| + return suggestions_[index].frontend_id == POPUP_ITEM_ID_WARNING_MESSAGE || |
|
Mathieu
2016/11/12 12:52:05
this warning item id now becomes oddly non-specifi
lshang
2016/11/14 10:51:01
Done.
|
| + suggestions_[index].frontend_id == |
| + POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE; |
| } |
| gfx::Rect AutofillPopupControllerImpl::popup_bounds() const { |
| @@ -386,6 +388,14 @@ SkColor AutofillPopupControllerImpl::GetBackgroundColorForRow(int index) const { |
| return SK_ColorTRANSPARENT; |
| } |
| +SkColor AutofillPopupControllerImpl::GetTextColorForRow(int index) const { |
| + if (suggestions_[index].frontend_id == |
| + autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) |
| + return kHttpWarningTextColor; |
| + |
| + return IsWarning(index) ? kLabelTextColor : kValueTextColor; |
|
Mathieu
2016/11/12 12:52:05
Remove the IsWarning function completely (it was o
lshang
2016/11/14 10:51:01
Done.
|
| +} |
| + |
| int AutofillPopupControllerImpl::selected_line() const { |
| return selected_line_; |
| } |
| @@ -461,7 +471,8 @@ bool AutofillPopupControllerImpl::RemoveSelectedLine() { |
| bool AutofillPopupControllerImpl::CanAccept(int id) { |
| return id != POPUP_ITEM_ID_SEPARATOR && id != POPUP_ITEM_ID_WARNING_MESSAGE && |
| - id != POPUP_ITEM_ID_TITLE; |
| + id != POPUP_ITEM_ID_TITLE && |
| + id != POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE; |
|
Mathieu
2016/11/12 12:52:05
shouldn't the row be clickable? if so, but a TODO
lshang
2016/11/14 10:51:01
Yeah we need it to direct to a help center page. A
|
| } |
| bool AutofillPopupControllerImpl::HasSuggestions() { |