Chromium Code Reviews| Index: chrome/browser/ui/views/payments/payment_request_row_view.cc |
| diff --git a/chrome/browser/ui/views/payments/payment_request_row_view.cc b/chrome/browser/ui/views/payments/payment_request_row_view.cc |
| index 05cdb38e999b986af13264bd56ce0a44a993ae1d..a613e77efa4a9e9c637355ede7f1cd4be62deadf 100644 |
| --- a/chrome/browser/ui/views/payments/payment_request_row_view.cc |
| +++ b/chrome/browser/ui/views/payments/payment_request_row_view.cc |
| @@ -16,6 +16,7 @@ PaymentRequestRowView::PaymentRequestRowView(views::ButtonListener* listener, |
| : views::CustomButton(listener), clickable_(clickable) { |
| SetEnabled(clickable_); |
| SetBorder(payments::CreatePaymentRequestRowBorder()); |
| + SetFocusBehavior(views::View::FocusBehavior::ALWAYS); |
| } |
| PaymentRequestRowView::~PaymentRequestRowView() {} |
| @@ -30,4 +31,18 @@ void PaymentRequestRowView::StateChanged(ButtonState old_state) { |
| } |
| } |
| +void PaymentRequestRowView::OnFocus() { |
| + if (clickable_) { |
| + set_background(views::Background::CreateSolidBackground(SK_ColorLTGRAY)); |
|
Mathieu
2017/05/02 13:16:10
We should get the proper color from the theme to u
anthonyvd
2017/05/02 13:43:32
Oh good call! Done.
|
| + SchedulePaint(); |
| + } |
| +} |
| + |
| +void PaymentRequestRowView::OnBlur() { |
| + if (clickable_) { |
| + set_background(nullptr); |
| + SchedulePaint(); |
| + } |
| +} |
| + |
| } // namespace payments |